From: Rob Browning Date: Sun, 5 Dec 2010 20:35:16 +0000 (-0600) Subject: Preserve existing stack trace when throwing MetadataErrors. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=03f7d0b12a6a8d0f6b85e2c87b63cd016c1824f6;p=packages%2Fb%2Fbup.git Preserve existing stack trace when throwing MetadataErrors. --- diff --git a/lib/bup/metadata.py b/lib/bup/metadata.py index 118688a..ce92d4f 100644 --- a/lib/bup/metadata.py +++ b/lib/bup/metadata.py @@ -515,7 +515,7 @@ class Metadata: self._apply_linux_attr_rec(path, restore_numeric_ids=num_ids) self._apply_linux_xattr_rec(path, restore_numeric_ids=num_ids) except Exception, e: - raise MetadataApplyError(e) + raise MetadataApplyError(e), None, sys.exc_info()[2] def from_path(path, archive_path=None, save_symlinks=True): @@ -530,7 +530,7 @@ def from_path(path, archive_path=None, save_symlinks=True): result._add_linux_attr(path, st) result._add_linux_xattr(path, st) except Exception, e: - raise MetadataAcquireError(e) + raise MetadataAcquireError(e), None, sys.exc_info()[2] return result