Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
catching KeyError exception when checking if the attach exists
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavofonseca committed Nov 11, 2011
1 parent ea5cb14 commit c4ddf27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isis/model/couchdb.py
Expand Up @@ -31,7 +31,7 @@ def _attach_exists(old_doc, property_name):
try: try:
if old_doc[property_name]['filename'] in old_doc['_attachments']: if old_doc[property_name]['filename'] in old_doc['_attachments']:
return True return True
except (AttributeError, TypeError): except (AttributeError, TypeError, KeyError):
pass pass


return False return False
Expand Down

0 comments on commit c4ddf27

Please sign in to comment.