summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-07-29 01:11:09 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-07-29 01:11:09 (GMT)
commit2527796a22404d5b8cb0e498a965c6b4a743caac (patch)
tree5bc07b91dde0085cc09c3336ed740f6817f11fc3 /Tools
parent1e3a68d36b08cd9d59084a37c8cb6c2d911868ce (diff)
parentcf534817adc49b2562d175fabd3e3992d25063fe (diff)
downloadcpython-2527796a22404d5b8cb0e498a965c6b4a743caac.zip
cpython-2527796a22404d5b8cb0e498a965c6b4a743caac.tar.gz
cpython-2527796a22404d5b8cb0e498a965c6b4a743caac.tar.bz2
Merge from 3.2 (#10318, #12255, #12043, #12417 and other fixes)
Diffstat (limited to 'Tools')
-rwxr-xr-x[-rw-r--r--]Tools/scripts/abitype.py1
-rwxr-xr-x[-rw-r--r--]Tools/scripts/cleanfuture.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/combinerefs.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/db2pickle.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/diff.py1
-rwxr-xr-x[-rw-r--r--]Tools/scripts/find_recursionlimit.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/get-remote-certificate.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/mailerdaemon.py25
-rwxr-xr-x[-rw-r--r--]Tools/scripts/make_ctype.py1
-rwxr-xr-x[-rw-r--r--]Tools/scripts/md5sum.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/patchcheck.py1
-rwxr-xr-x[-rw-r--r--]Tools/scripts/pickle2db.py0
-rwxr-xr-x[-rw-r--r--]Tools/scripts/pysource.py0
-rwxr-xr-xTools/scripts/reindent-rst.py2
-rwxr-xr-x[-rw-r--r--]Tools/scripts/svneol.py0
15 files changed, 22 insertions, 9 deletions
diff --git a/Tools/scripts/abitype.py b/Tools/scripts/abitype.py
index e35ef6a..4d96c8b 100644..100755
--- a/Tools/scripts/abitype.py
+++ b/Tools/scripts/abitype.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# This script converts a C file to use the PEP 384 type definition API
# Usage: abitype.py < old_code > new_code
import re, sys
diff --git a/Tools/scripts/cleanfuture.py b/Tools/scripts/cleanfuture.py
index b48ab60..b48ab60 100644..100755
--- a/Tools/scripts/cleanfuture.py
+++ b/Tools/scripts/cleanfuture.py
diff --git a/Tools/scripts/combinerefs.py b/Tools/scripts/combinerefs.py
index e10e49a..e10e49a 100644..100755
--- a/Tools/scripts/combinerefs.py
+++ b/Tools/scripts/combinerefs.py
diff --git a/Tools/scripts/db2pickle.py b/Tools/scripts/db2pickle.py
index a5532a8..a5532a8 100644..100755
--- a/Tools/scripts/db2pickle.py
+++ b/Tools/scripts/db2pickle.py
diff --git a/Tools/scripts/diff.py b/Tools/scripts/diff.py
index 52dcab1..9efb078 100644..100755
--- a/Tools/scripts/diff.py
+++ b/Tools/scripts/diff.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
""" Command line interface to difflib.py providing diffs in four formats:
* ndiff: lists every line and highlights interline changes.
diff --git a/Tools/scripts/find_recursionlimit.py b/Tools/scripts/find_recursionlimit.py
index 443f052..443f052 100644..100755
--- a/Tools/scripts/find_recursionlimit.py
+++ b/Tools/scripts/find_recursionlimit.py
diff --git a/Tools/scripts/get-remote-certificate.py b/Tools/scripts/get-remote-certificate.py
index 5811f20..5811f20 100644..100755
--- a/Tools/scripts/get-remote-certificate.py
+++ b/Tools/scripts/get-remote-certificate.py
diff --git a/Tools/scripts/mailerdaemon.py b/Tools/scripts/mailerdaemon.py
index 4934b92..aeb451e 100644..100755
--- a/Tools/scripts/mailerdaemon.py
+++ b/Tools/scripts/mailerdaemon.py
@@ -1,4 +1,5 @@
-"""mailerdaemon - classes to parse mailer-daemon messages"""
+#!/usr/bin/env python3
+"""Classes to parse mailer-daemon messages."""
import calendar
import email.message
@@ -6,7 +7,10 @@ import re
import os
import sys
-Unparseable = 'mailerdaemon.Unparseable'
+
+class Unparseable(Exception):
+ pass
+
class ErrorMessage(email.message.Message):
def __init__(self):
@@ -18,8 +22,10 @@ class ErrorMessage(email.message.Message):
if not sub:
return 0
sub = sub.lower()
- if sub.startswith('waiting mail'): return 1
- if 'warning' in sub: return 1
+ if sub.startswith('waiting mail'):
+ return 1
+ if 'warning' in sub:
+ return 1
self.sub = sub
return 0
@@ -145,14 +151,17 @@ def emparse_list(fp, sub):
errors.append(' '.join((email.strip()+': '+reason).split()))
return errors
-EMPARSERS = [emparse_list, ]
+EMPARSERS = [emparse_list]
def sort_numeric(a, b):
a = int(a)
b = int(b)
- if a < b: return -1
- elif a > b: return 1
- else: return 0
+ if a < b:
+ return -1
+ elif a > b:
+ return 1
+ else:
+ return 0
def parsedir(dir, modify):
os.chdir(dir)
diff --git a/Tools/scripts/make_ctype.py b/Tools/scripts/make_ctype.py
index 359d6b3..afee1c5 100644..100755
--- a/Tools/scripts/make_ctype.py
+++ b/Tools/scripts/make_ctype.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Script that generates the ctype.h-replacement in stringobject.c."""
NAMES = ("LOWER", "UPPER", "ALPHA", "DIGIT", "XDIGIT", "ALNUM", "SPACE")
diff --git a/Tools/scripts/md5sum.py b/Tools/scripts/md5sum.py
index 743da72..743da72 100644..100755
--- a/Tools/scripts/md5sum.py
+++ b/Tools/scripts/md5sum.py
diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py
index d42bc8a..8b0d3cd 100644..100755
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import re
import sys
import shutil
diff --git a/Tools/scripts/pickle2db.py b/Tools/scripts/pickle2db.py
index b5b6571..b5b6571 100644..100755
--- a/Tools/scripts/pickle2db.py
+++ b/Tools/scripts/pickle2db.py
diff --git a/Tools/scripts/pysource.py b/Tools/scripts/pysource.py
index c7dbe60..c7dbe60 100644..100755
--- a/Tools/scripts/pysource.py
+++ b/Tools/scripts/pysource.py
diff --git a/Tools/scripts/reindent-rst.py b/Tools/scripts/reindent-rst.py
index ceb84bf..25608af 100755
--- a/Tools/scripts/reindent-rst.py
+++ b/Tools/scripts/reindent-rst.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Make a reST file compliant to our pre-commit hook.
# Currently just remove trailing whitespace.
diff --git a/Tools/scripts/svneol.py b/Tools/scripts/svneol.py
index 8abdd01..8abdd01 100644..100755
--- a/Tools/scripts/svneol.py
+++ b/Tools/scripts/svneol.py