diff options
author | stepshal <nessento@openmailbox.org> | 2016-10-18 20:24:35 +0700 |
---|---|---|
committer | stepshal <nessento@openmailbox.org> | 2016-10-18 20:29:34 +0700 |
commit | 31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96 (patch) | |
tree | 3a25ce5765a8c9ae633a3eaeec1ce88f7b382e21 /setuptools/sandbox.py | |
parent | f774a0be095c3873c2881d393605fefa5ca0d0d6 (diff) | |
download | external_python_setuptools-31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96.tar.gz external_python_setuptools-31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96.tar.bz2 external_python_setuptools-31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96.zip |
Fix quantity of blank lines.
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-x | setuptools/sandbox.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 2babb636..53ce1551 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -99,6 +99,7 @@ class UnpickleableException(Exception): """ An exception representing another Exception that could not be pickled. """ + @staticmethod def dump(type, exc): """ @@ -243,6 +244,7 @@ def run_setup(setup_script, args): def runner(): ns = dict(__file__=setup_script, __name__='__main__') _execfile(setup_script, ns) + DirectorySandbox(setup_dir).run(runner) except SystemExit as v: if v.args and v.args[0]: @@ -301,6 +303,7 @@ class AbstractSandbox: if self._active: path = self._remap_input(name, path, *args, **kw) return original(path, *args, **kw) + return wrap if _file: @@ -322,6 +325,7 @@ class AbstractSandbox: path = self._remap_input(name, path, *args, **kw) return self._remap_output(name, original(path, *args, **kw)) return original(path, *args, **kw) + return wrap for name in ['readlink', 'tempnam']: @@ -336,6 +340,7 @@ class AbstractSandbox: if self._active: return self._remap_output(name, retval) return retval + return wrap for name in ['getcwd', 'tmpnam']: @@ -404,6 +409,7 @@ class DirectorySandbox(AbstractSandbox): raise SandboxViolation(operation, args, kw) if _file: + def _file(self, path, mode='r', *args, **kw): if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path): self._violation("file", path, mode, *args, **kw) |