Commit b5219c26 authored by ben's avatar ben

Fixed rpath unpickling error


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@96 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 3f9338bc
......@@ -270,7 +270,6 @@ class HLDestinationStruct:
try: return thunk()
except (EnvironmentError, SkipFileException, DSRPPermError,
RPathException), exc:
Log.exception()
if (not isinstance(exc, EnvironmentError) or
(errno.errorcode[exc[0]] in
['EPERM', 'ENOENT', 'EACCES', 'EBUSY', 'EEXIST',
......@@ -278,10 +277,13 @@ class HLDestinationStruct:
'EIO', # reported by docv
'ETXTBSY' # reported by Campbell on some NT system
])):
Log.exception()
Log("Skipping file because of error after %s" %
(dsrp and dsrp.index,), 2)
return None
else: raise
else:
Log.exception(1,2)
raise
def handle_last_error(cls, dsrp, finalizer, ITR = None):
"""If catch fatal error, try to checkpoint before exiting"""
......
......@@ -443,6 +443,7 @@ class RPath(RORPath):
def __setstate__(self, rpath_state):
"""Reproduce RPath from __getstate__ output"""
self.conn = Globals.local_connection
self.index, self.base, self.data = rpath_state
def setdata(self):
......
......@@ -270,7 +270,6 @@ class HLDestinationStruct:
try: return thunk()
except (EnvironmentError, SkipFileException, DSRPPermError,
RPathException), exc:
Log.exception()
if (not isinstance(exc, EnvironmentError) or
(errno.errorcode[exc[0]] in
['EPERM', 'ENOENT', 'EACCES', 'EBUSY', 'EEXIST',
......@@ -278,10 +277,13 @@ class HLDestinationStruct:
'EIO', # reported by docv
'ETXTBSY' # reported by Campbell on some NT system
])):
Log.exception()
Log("Skipping file because of error after %s" %
(dsrp and dsrp.index,), 2)
return None
else: raise
else:
Log.exception(1,2)
raise
def handle_last_error(cls, dsrp, finalizer, ITR = None):
"""If catch fatal error, try to checkpoint before exiting"""
......
......@@ -443,6 +443,7 @@ class RPath(RORPath):
def __setstate__(self, rpath_state):
"""Reproduce RPath from __getstate__ output"""
self.conn = Globals.local_connection
self.index, self.base, self.data = rpath_state
def setdata(self):
......
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