Try to fix python problems
"Octal literals are no longer of the form 0720; use 0o720 instead." See http://docs.python.org/3.0/whatsnew/3.0.html Seems ok with Python < 3 Change-Id: I588a9dcc4f4b447d5cb88eb6bb03ab2d598dc9f0
This commit is contained in:
@@ -89,8 +89,8 @@ def nsinstall(argv):
|
|||||||
options.m = int(options.m, 8)
|
options.m = int(options.m, 8)
|
||||||
# I have no idea why nss insists on using this mode for installed headers.
|
# I have no idea why nss insists on using this mode for installed headers.
|
||||||
# It causes problems with updating the files during a rebuild.
|
# It causes problems with updating the files during a rebuild.
|
||||||
if options.m == 0444:
|
if options.m == 0o444:
|
||||||
options.m = 0644
|
options.m = 0o644
|
||||||
except:
|
except:
|
||||||
sys.stderr.write('nsinstall: ' + options.m + ' is not a valid mode\n')
|
sys.stderr.write('nsinstall: ' + options.m + ' is not a valid mode\n')
|
||||||
return 1
|
return 1
|
||||||
@@ -147,7 +147,7 @@ def nsinstall(argv):
|
|||||||
shutil.copy2(srcpath, targetpath)
|
shutil.copy2(srcpath, targetpath)
|
||||||
else:
|
else:
|
||||||
if os.path.exists(targetpath):
|
if os.path.exists(targetpath):
|
||||||
os.chmod(targetpath, 0755)
|
os.chmod(targetpath, 0o755)
|
||||||
os.remove(targetpath)
|
os.remove(targetpath)
|
||||||
shutil.copy(srcpath, targetpath)
|
shutil.copy(srcpath, targetpath)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user