diff options
-rw-r--r-- | pkg_resources.py | 4 | ||||
-rwxr-xr-x | setuptools/command/easy_install.py | 10 | ||||
-rwxr-xr-x | setuptools/command/install_scripts.py | 2 | ||||
-rwxr-xr-x | setuptools/sandbox.py | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 09a5f2ed..372480ea 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -77,7 +77,7 @@ try: except ImportError: pass -def _bypass_ensure_directory(name, mode=0x1FF): # 0777 +def _bypass_ensure_directory(name, mode=0o777): # Sandbox-bypassing version of ensure_directory() if not WRITE_SUPPORT: raise IOError('"os.mkdir" not supported on this platform.') @@ -1061,7 +1061,7 @@ variable to point to an accessible directory. if os.name == 'posix': # Make the resource executable - mode = ((os.stat(tempname).st_mode) | 0x16D) & 0xFFF # 0555, 07777 + mode = ((os.stat(tempname).st_mode) | 0o555) & 0o7777 os.chmod(tempname, mode) def set_extraction_path(self, path): diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index de139f2f..00cd300a 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -770,7 +770,7 @@ Please make the appropriate changes for your system and try again. f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0x1FF-mask) # 0777 + chmod(target, 0o777-mask) def install_eggs(self, spec, dist_filename, tmpdir): # .egg dirs or files are already built, so just return them @@ -1110,7 +1110,7 @@ See the setuptools documentation for the "develop" command for more info. self.byte_compile(to_compile) if not self.dry_run: for f in to_chmod: - mode = ((os.stat(f)[stat.ST_MODE]) | 0x16D) & 0xFED # 0555, 07755 + mode = ((os.stat(f)[stat.ST_MODE]) | 0o555) & 0o7755 chmod(f, mode) def byte_compile(self, to_compile): @@ -1206,8 +1206,8 @@ Please make the appropriate changes for your system and try again.""" home = convert_path(os.path.expanduser("~")) for name, path in iteritems(self.config_vars): if path.startswith(home) and not os.path.isdir(path): - self.debug_print("os.makedirs('%s', 0700)" % path) - os.makedirs(path, 0x1C0) # 0700 + self.debug_print("os.makedirs('%s', 0o700)" % path) + os.makedirs(path, 0o700) INSTALL_SCHEMES = dict( posix = dict( @@ -1873,7 +1873,7 @@ def rmtree(path, ignore_errors=False, onerror=auto_chmod): onerror(os.rmdir, path, sys.exc_info()) def current_umask(): - tmp = os.umask(0x12) # 022 + tmp = os.umask(0o022) os.umask(tmp) return tmp diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index c19536bf..ac373193 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -49,4 +49,4 @@ class install_scripts(orig.install_scripts): f = open(target,"w"+mode) f.write(contents) f.close() - chmod(target, 0x1FF-mask) # 0777 + chmod(target, 0o777-mask) diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 042c5958..dc6e54bf 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -268,7 +268,7 @@ class DirectorySandbox(AbstractSandbox): self._violation(operation, src, dst, *args, **kw) return (src,dst) - def open(self, file, flags, mode=0x1FF, *args, **kw): # 0777 + def open(self, file, flags, mode=0o777, *args, **kw): """Called for low-level os.open()""" if flags & WRITE_FLAGS and not self._ok(file): self._violation("os.open", file, flags, mode, *args, **kw) |