From 9948d3c8a7880cbc13012e8a3fedda130614601d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Jan 2015 21:40:02 -0500 Subject: Make attributes private and remove redundant naming. --- setuptools/sandbox.py | 14 +++++++------- 1 file 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 -- cgit v1.2.3