Commit 3d9fa295 authored by Guido van Rossum's avatar Guido van Rossum

Don't crash if an expected output file can't be opened.

parent 2d41650b
...@@ -62,6 +62,7 @@ def main(): ...@@ -62,6 +62,7 @@ def main():
f = open(outfile) f = open(outfile)
except IOError: except IOError:
expected = None expected = None
print "(missing file %s)" % outfile,
else: else:
expected = f.readlines() expected = f.readlines()
f.close() f.close()
...@@ -74,7 +75,8 @@ def main(): ...@@ -74,7 +75,8 @@ def main():
print "OK" print "OK"
else: else:
print "not OK" print "not OK"
showdiff(expected, actual) if expected is not None:
showdiff(expected, actual)
def readlines(f): def readlines(f):
L = [] L = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment