Skip to content

Commit

Permalink
Merge pull request #5189 from dimagi/catch-attribute-error
Browse files Browse the repository at this point in the history
Catch AttributeError
  • Loading branch information
twymer committed Jan 2, 2015
2 parents 5577c8a + 8e48c64 commit ffb301f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions corehq/ex-submodules/casexml/apps/case/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ def rebuild_case(case_id):
delattr(case, k)
except KeyError:
pass
except AttributeError as e:
except AttributeError:
logging.error(
'AttributeError: %(error)s, case_id: %(case_id)s, attribute: %(attribute)s' % {
'error': e.message,
"Cannot delete attribute '%(attribute)s' from case '%(case_id)s'" % {
'case_id': case_id,
'attribute': k,
}
)
raise e

# already deleted means it was explicitly set to "deleted",
# as opposed to getting set to that because it has no actions
Expand Down

0 comments on commit ffb301f

Please sign in to comment.