diff options
author | Guido van Rossum <guido@python.org> | 1996-08-26 14:37:47 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-26 14:37:47 (GMT) |
commit | c30461dd38ee599d781ac9973d643a940717648b (patch) | |
tree | 08ef815cccda26f1862bc3ec2b55cd8b66fab65b /Tools/bgen | |
parent | c9970eecc2cba3f7b59dd619c8fb4555b144aa3c (diff) | |
download | cpython-c30461dd38ee599d781ac9973d643a940717648b.zip cpython-c30461dd38ee599d781ac9973d643a940717648b.tar.gz cpython-c30461dd38ee599d781ac9973d643a940717648b.tar.bz2 |
Insert filename in IOError message.
Diffstat (limited to 'Tools/bgen')
-rw-r--r-- | Tools/bgen/bgen/scantools.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py index 89447e1..5800681 100644 --- a/Tools/bgen/bgen/scantools.py +++ b/Tools/bgen/bgen/scantools.py @@ -296,7 +296,10 @@ if missing: raise "Missing Types" self.defsmine = mine def openoutput(self, filename): - file = open(filename, 'w') + try: + file = open(filename, 'w') + except IOError, arg: + raise IOError, (filename, arg) self.setfiletype(filename) return file |