aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-xsetuptools/sandbox.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 213cebff..b8b1bac1 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -98,8 +98,8 @@ class UnpickleableException(Exception):
"""
An exception representing another Exception that could not be pickled.
"""
- @classmethod
- def dump(cls, type, exc):
+ @staticmethod
+ def dump(type, exc):
"""
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.
@@ -107,6 +107,8 @@ class UnpickleableException(Exception):
try:
return pickle.dumps(type), pickle.dumps(exc)
except Exception:
+ # get UnpickleableException inside the sandbox
+ from setuptools.sandbox import UnpickleableException as cls
return cls.dump(cls, cls(repr(exc)))