diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-14 21:40:02 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-14 21:40:02 -0500 |
commit | f9d72118b7e63fd29238f882f155600fd673427f (patch) | |
tree | 404341adc77ab82f3b9f1e3e1d0a4960aae616b6 | |
parent | b2a651ec27c8b354c18845f7c8aa04c3f87347c9 (diff) | |
download | python-setuptools-bitbucket-f9d72118b7e63fd29238f882f155600fd673427f.tar.gz |
Make attributes private and remove redundant naming.
-rwxr-xr-x | setuptools/sandbox.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 37d89a2a..0847ef41 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -105,9 +105,9 @@ class ExceptionSaver: return # dump the exception - self.saved_type = pickle.dumps(type) - self.saved_exc = pickle.dumps(exc) - self.tb = tb + self._type = pickle.dumps(type) + self._exc = pickle.dumps(exc) + self._tb = tb # suppress the exception return True @@ -115,12 +115,12 @@ class ExceptionSaver: def resume(self): "restore and re-raise any exception" - if 'saved_exc' not in vars(self): + if '_exc' not in vars(self): return - type = pickle.loads(self.saved_type) - exc = pickle.loads(self.saved_exc) - compat.reraise(type, exc, self.tb) + type = pickle.loads(self._type) + exc = pickle.loads(self._exc) + compat.reraise(type, exc, self._tb) @contextlib.contextmanager |