Commit c453b1f5 authored by ben's avatar ben

Changed resume code - unpickling may cause variety of errors


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@209 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 6451b36a
...@@ -607,8 +607,9 @@ class Resume: ...@@ -607,8 +607,9 @@ class Resume:
data = fp.read() data = fp.read()
fp.close() fp.close()
try: result = cPickle.loads(data) try: result = cPickle.loads(data)
except cPickle.UnpicklingError: except Exception, exc:
raise ResumeException("Bad pickle at %s" % (checkpoint_rp.path,)) raise ResumeException("Bad pickle at %s: %s" %
(checkpoint_rp.path, exc))
return result return result
def ResumeCheck(cls): def ResumeCheck(cls):
......
...@@ -607,8 +607,9 @@ class Resume: ...@@ -607,8 +607,9 @@ class Resume:
data = fp.read() data = fp.read()
fp.close() fp.close()
try: result = cPickle.loads(data) try: result = cPickle.loads(data)
except cPickle.UnpicklingError: except Exception, exc:
raise ResumeException("Bad pickle at %s" % (checkpoint_rp.path,)) raise ResumeException("Bad pickle at %s: %s" %
(checkpoint_rp.path, exc))
return result return result
def ResumeCheck(cls): def ResumeCheck(cls):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment