Don't puke when exiting driver list
When you run the generate_driver_list.py file from inside the tools dir, it pukes out an AttributeError for NoneType object has no attribute 'close'. This patch makes sure that exiting doesn't cause a puke. Change-Id: Ib6c4f451096cd07d0423941cab52ffa8cd8dc471
This commit is contained in:
parent
b7860e3afc
commit
c28cd113be
@ -37,7 +37,8 @@ class Output(object):
|
||||
return self
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
self.driver_file.close()
|
||||
if self.driver_file:
|
||||
self.driver_file.close()
|
||||
|
||||
def write(self, text):
|
||||
if self.driver_file:
|
||||
|
Loading…
x
Reference in New Issue
Block a user