Don't crash if not opened
svn: r23331
This commit is contained in:
parent
27c5f4ffc5
commit
e33642c412
@ -436,6 +436,7 @@ class ImportOpenFileContextManager:
|
|||||||
|
|
||||||
def __exit__(self, exc_type, exc_value, traceback):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
if self.filename != '-':
|
if self.filename != '-':
|
||||||
|
if self.filehandle:
|
||||||
self.filehandle.close()
|
self.filehandle.close()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user