Permalink
Browse files

BUG archive not closed on key error

  • Loading branch information...
1 parent 52abcb8 commit 31b809de32c8ecae1d9cd0c4ba8d89270945aa46 @kwgoodman committed Mar 7, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 la/io.py
View
@@ -168,9 +168,11 @@ def __getitem__(self, key):
x = lara(self.filename, key)
return x
else:
+ f.close()
msg = "%s is in the archive but it is not a larry."
raise KeyError(msg % key)
else:
+ f.close()
raise KeyError("A larry named %s is not in the archive." % key)
def __setitem__(self, key, value):

0 comments on commit 31b809d

Please sign in to comment.