Permalink
Browse files

Merge pull request #24 from gustavofonseca/master

catching KeyError exception when checking if the attach exists
  • Loading branch information...
gustavofonseca committed Nov 11, 2011
2 parents 7a26cbd + c4ddf27 commit eea25eecf7b0fab93f519571883f52e1349f21a9
Showing with 1 addition and 1 deletion.
  1. +1 −1 isis/model/couchdb.py
View
@@ -31,7 +31,7 @@ def _attach_exists(old_doc, property_name):
try:
if old_doc[property_name]['filename'] in old_doc['_attachments']:
return True
- except (AttributeError, TypeError):
+ except (AttributeError, TypeError, KeyError):
pass
return False

0 comments on commit eea25ee

Please sign in to comment.