Skip to content

Commit

Permalink
[svn] Adding catches for bad pickle load issues.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
bbangert committed Aug 8, 2007
1 parent 7b5254f commit 8a8172c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion beaker/container.py
Expand Up @@ -711,7 +711,10 @@ def do_release_write_lock(self):
def do_open(self, flags):
if self.file_exists(self.file):
fh = open(self.file, 'rb')
self.hash = cPickle.load(fh)
try:
self.hash = cPickle.load(fh)
except (IOError, OSError, EOFError, cPickle.PickleError):
pass
fh.close()
self.flags = flags

Expand Down

0 comments on commit 8a8172c

Please sign in to comment.