From 03f7d0b12a6a8d0f6b85e2c87b63cd016c1824f6 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 5 Dec 2010 14:35:16 -0600 Subject: [PATCH] Preserve existing stack trace when throwing MetadataErrors. --- lib/bup/metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5