Commit d485d11e authored by owsla's avatar owsla

Improve support for Python 2.5, which refactored the built-in exceptions so

that SystemExit and KeyboardInterrupt no longer derive from Exception.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@936 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent c3105aed
New in v1.2.2 (????/??/??)
---------------------------
Improve support for Python 2.5, which refactored the built-in exceptions so
that SystemExit and KeyboardInterrupt no longer derive from Exception.
Closes support request #106504. (Andrew Ferguson)
Adjust --exclude-if-present option to support directories, symlinks, device
files, etc. Closes bug #24192. Thanks to Vadim Zeitlin for the suggestion.
......
......@@ -368,6 +368,8 @@ class PipeConnection(LowLevelPipeConnection):
result = self.get_response(req_num)
self.unused_request_numbers[req_num] = None
if isinstance(result, Exception): raise result
elif isinstance(result, SystemExit): raise result
elif isinstance(result, KeyboardInterrupt): raise result
else: return result
def get_new_req_num(self):
......
......@@ -30,7 +30,7 @@ def check_common_error(error_handler, function, args = []):
"""
try: return function(*args)
except Exception, exc:
except (Exception, KeyboardInterrupt, SystemExit), exc:
TracebackArchive.add([function] + list(args))
if catch_error(exc):
log.Log.exception()
......
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