aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools')
-rwxr-xr-xsetuptools/command/easy_install.py10
-rwxr-xr-xsetuptools/command/install_scripts.py2
-rwxr-xr-xsetuptools/sandbox.py2
3 files changed, 7 insertions, 7 deletions
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)