]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Fix octal constants syntax (python3 compat)
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Jan 2021 19:49:30 +0000 (20:49 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Jan 2021 19:49:30 +0000 (20:49 +0100)
modules/cons.py
modules/sign.py
wwwbin/dump-packagenames.py

index 61569f6e86c7d543031b701d45edcfd301ffaf05..8213c68f759b3b44a00b9a83590e55f51abcd1c8 100644 (file)
@@ -58,9 +58,9 @@ def createlistener(path):
     s.setblocking(False)
     s.bind(path)
     if path==ftpio.pubsock:
-        os.chmod(path, 0606)
+        os.chmod(path, 0o606)
     else:
-        os.chmod(path, 0600)
+        os.chmod(path, 0o600)
     s.listen(3)
     return s
 
index 3a82c5b3fc367723dda5b63d471056ac60338061..1b2da4e51225d1bf0f3cee036f4015274196f291 100644 (file)
@@ -56,4 +56,4 @@ def signpkgs(files, password):
     if rc != 0:
         raise OSError('package signing failed')
     for rpm in files:
-        os.chmod(rpm, 0644)
+        os.chmod(rpm, 0o644)
index 61e890bcf1de3e6de34f9c4aac745e782e797174..5288a92a7c4b5310e2a9b70c8527365c42cbe971 100755 (executable)
@@ -56,6 +56,6 @@ f = open(outname + ".tmp", "w")
 for (pkg, spkg) in iter(pkgs.items()):
        f.write("%s:%s\n" % (pkg, spkg))
 f.close()
-os.chmod(outname + ".tmp", 0644)
+os.chmod(outname + ".tmp", 0o644)
 os.rename(outname + ".tmp", outname)
 
This page took 0.081731 seconds and 4 git commands to generate.