From 519d9c9c83ee6ecb8977ce4afc3d87d84f218b19 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 6 Apr 2014 10:31:07 +1700 Subject: [PATCH] [PATCH 3/7] doc/prerst2man.py: Use Python-3-compatible octal notation --- b4/40c1b8304686260d7b41019949a7015d8f054c | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 b4/40c1b8304686260d7b41019949a7015d8f054c diff --git a/b4/40c1b8304686260d7b41019949a7015d8f054c b/b4/40c1b8304686260d7b41019949a7015d8f054c new file mode 100644 index 000000000..7b831511f --- /dev/null +++ b/b4/40c1b8304686260d7b41019949a7015d8f054c @@ -0,0 +1,103 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6A57F431FB6 + for ; Sat, 5 Apr 2014 10:41:29 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id faQh9QtpMgA3 for ; + Sat, 5 Apr 2014 10:41:23 -0700 (PDT) +Received: from QMTA11.westchester.pa.mail.comcast.net + (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) + by olra.theworths.org (Postfix) with ESMTP id DECD1431FAF + for ; Sat, 5 Apr 2014 10:41:22 -0700 (PDT) +Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88]) + by QMTA11.westchester.pa.mail.comcast.net with comcast + id mHb71n0051uE5Es5BHhNcN; Sat, 05 Apr 2014 17:41:22 +0000 +Received: from odin.tremily.us ([24.18.63.50]) + by omta16.westchester.pa.mail.comcast.net with comcast + id mHhM1n00F152l3L3cHhNqU; Sat, 05 Apr 2014 17:41:22 +0000 +Received: from mjolnir.tremily.us (unknown [192.168.0.140]) + by odin.tremily.us (Postfix) with ESMTPS id 3FCD11103C16; + Sat, 5 Apr 2014 10:31:25 -0700 (PDT) +Received: (nullmailer pid 16917 invoked by uid 1000); + Sat, 05 Apr 2014 17:31:15 -0000 +From: "W. Trevor King" +To: notmuch@notmuchmail.org +Subject: [PATCH 3/7] doc/prerst2man.py: Use Python-3-compatible octal notation +Date: Sat, 5 Apr 2014 10:31:07 -0700 +Message-Id: + <5e4509ab08699afe2681110fb35075e1d0bbdc7e.1396718720.git.wking@tremily.us> +X-Mailer: git-send-email 1.9.1.353.gc66d89d +In-Reply-To: +References: +In-Reply-To: +References: +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; + s=q20140121; t=1396719682; + bh=JhZtuEvKNlZ1+bHeeQemDprrBPlvjJ/SfewoKJTC+bc=; + h=Received:Received:Received:Received:From:To:Subject:Date: + Message-Id; + b=nlpnBT1wVE/Au9zdHyYN5xQaKpFbB05JYvbyeQtJrJOudkeerLMpkI0gMa5CVxQdK + PMtUvdct1K5wv/abcTz95pJqVq2f2r1BL+/Up6/ketW5WnDG48D2bgv8FiupElGQt3 + EhuTxpUi41YcMjX5z6387ATc0waTDfyBjkPMi66TRvagqKuJvbdxT7YabyBSPuZj2k + ruIrjeOOnszoHdKFnj8DKHBdrtN86O7rtZUnMmrqgfvL2HwhM8qiX9cZ73RuooVfnY + 7H+O1iftJWCoD/2GLH6tZBmMw5UJS4wQKP7dw981AKC5Lmg0uRZniaHACBJanKs0tR + BEiXsCQwxIN4g== +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 05 Apr 2014 17:41:29 -0000 + +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 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doc/prerst2man.py b/doc/prerst2man.py +index 4591264..108f4a3 100644 +--- a/doc/prerst2man.py ++++ b/doc/prerst2man.py +@@ -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') +-- +1.9.1.353.gc66d89d + -- 2.26.2