summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-22 23:05:06 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-22 23:05:06 (GMT)
commita817e5894b20d68263056bf9af8f1582954b1d8f (patch)
tree2409955c53ffb88f6934f277d66c4fe44011e601 /Tools/scripts
parent2d7f6a079df2b4582d7ccc32a7a2a7287d0bf175 (diff)
downloadcpython-a817e5894b20d68263056bf9af8f1582954b1d8f.zip
cpython-a817e5894b20d68263056bf9af8f1582954b1d8f.tar.gz
cpython-a817e5894b20d68263056bf9af8f1582954b1d8f.tar.bz2
Convert raise statements in Tools/.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/texi2html.py4
-rwxr-xr-xTools/scripts/untabify.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/texi2html.py b/Tools/scripts/texi2html.py
index 37d6e91..eae466c 100755
--- a/Tools/scripts/texi2html.py
+++ b/Tools/scripts/texi2html.py
@@ -257,7 +257,7 @@ class TexinfoParser:
line = fp.readline()
lineno = lineno + 1
if line[:len(MAGIC)] <> MAGIC:
- raise SyntaxError, 'file does not begin with %r' % (MAGIC,)
+ raise SyntaxError('file does not begin with %r' % (MAGIC,))
self.parserest(fp, lineno)
# Parse the contents of a file, not expecting a MAGIC header
@@ -475,7 +475,7 @@ class TexinfoParser:
continue
if c <> '@':
# Cannot happen unless spprog is changed
- raise RuntimeError, 'unexpected funny %r' % c
+ raise RuntimeError('unexpected funny %r' % c)
start = i
while i < n and text[i] in string.ascii_letters: i = i+1
if i == start:
diff --git a/Tools/scripts/untabify.py b/Tools/scripts/untabify.py
index 49e9049..1a186a3 100755
--- a/Tools/scripts/untabify.py
+++ b/Tools/scripts/untabify.py
@@ -11,7 +11,7 @@ def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "t:")
if not args:
- raise getopt.error, "At least one file argument required"
+ raise getopt.error("At least one file argument required")
except getopt.error as msg:
print(msg)
print("usage:", sys.argv[0], "[-t tabwidth] file ...")