1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Use Python's "0o#" octal literal instead of deprecated "0#".

Reported as a compatibility issue by 2to3.

Signed-off-by: Jeremy Heiner <ScalaProtractor@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Jeremy Heiner 2013-10-12 12:44:32 -04:00 committed by Allan McRae
parent 4d24da8cda
commit 071ba05534
3 changed files with 5 additions and 5 deletions

View File

@ -161,7 +161,7 @@ class pmpkg(object):
if fileinfo["hasperms"]:
info.mode = fileinfo["perms"]
elif fileinfo["isdir"]:
info.mode = 0755
info.mode = 0o755
if fileinfo["isdir"]:
info.type = tarfile.DIRTYPE
tar.addfile(info)

View File

@ -131,7 +131,7 @@ class pmtest(object):
for sys_dir in sys_dirs:
if not os.path.isdir(sys_dir):
vprint("\t%s" % sys_dir[len(self.root)+1:])
os.makedirs(sys_dir, 0755)
os.makedirs(sys_dir, 0o755)
# Only the dynamically linked binary is needed for fakechroot
shutil.copy("/bin/sh", bindir)
if shell != "bin/sh":

View File

@ -84,12 +84,12 @@ def mkfile(base, name, data=""):
path = os.path.join(base, filename)
if info["isdir"]:
if not os.path.isdir(path):
os.makedirs(path, 0755)
os.makedirs(path, 0o755)
return
dir_path = os.path.dirname(path)
if dir_path and not os.path.isdir(dir_path):
os.makedirs(dir_path, 0755)
os.makedirs(dir_path, 0o755)
if info["islink"]:
os.symlink(info["link"], path)
@ -182,6 +182,6 @@ def mkdir(path):
return
elif os.path.isfile(path):
raise OSError("'%s' already exists and is not a directory" % path)
os.makedirs(path, 0755)
os.makedirs(path, 0o755)
# vim: set ts=4 sw=4 et: