]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Insert filename in IOError message.
authorGuido van Rossum <guido@python.org>
Mon, 26 Aug 1996 14:37:47 +0000 (14:37 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 26 Aug 1996 14:37:47 +0000 (14:37 +0000)
Tools/bgen/bgen/scantools.py

index 89447e1aa5f4c9340b2a4bde59fe6255ca3019ef..58006813a10f29eaf1ca9cc4a810e7a9772c35b8 100644 (file)
@@ -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