Insert filename in IOError message.

This commit is contained in:
Guido van Rossum 1996-08-26 14:37:47 +00:00
parent c9970eecc2
commit c30461dd38
1 changed files with 4 additions and 1 deletions

View 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