]> git.notmuchmail.org Git - notmuch/commitdiff
doc/prerst2man.py: Use Python-3-compatible octal notation
authorW. Trevor King <wking@tremily.us>
Sat, 5 Apr 2014 17:31:07 +0000 (10:31 -0700)
committerDavid Bremner <david@tethera.net>
Mon, 21 Apr 2014 12:31:54 +0000 (21:31 +0900)
Python 3 only supports the 0oXXX notation for octal literals [1,2],
which have also been supported in 2.x since 2.6 [2].

[1]: https://docs.python.org/3.0/whatsnew/3.0.html#integers
[2]: http://legacy.python.org/dev/peps/pep-3127/

doc/prerst2man.py

index 459126454a335f24dab05d4ee2048b1f5a0ec113..108f4a3949c0ba91791b6961cba904c4c7966069 100644 (file)
@@ -8,7 +8,7 @@ sourcedir = argv[1]
 outdir = argv[2]
 
 if not isdir(outdir):
-    makedirs(outdir, 0755)
+    makedirs(outdir, 0o755)
 
 execfile(sourcedir + "/conf.py")
 
@@ -34,7 +34,7 @@ blankre = re.compile("^\s*$")
 for page in man_pages:
     outdirname = outdir + '/' + dirname(page[0])
     if not isdir(outdirname):
-        makedirs(outdirname, 0755)
+        makedirs(outdirname, 0o755)
     filename = outdir + '/' + page[0] + '.rst'
     outfile = open(filename, 'w')
     infile = open(sourcedir + '/' + page[0] + '.rst', 'r')