Skip to content

Commit

Permalink
Release log handler in BuildSpace.end()
Browse files Browse the repository at this point in the history
Detected by our testsuite on Windows: NTFile(x).unlink() fail
because the BuildSpace kept a hanle on the log file.

Change-Id: Ib19c9f376c6aef7a768937b60b5a6598dd9bb5b4
  • Loading branch information
enzbang committed Oct 9, 2016
1 parent b309aa2 commit 9de5693
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e3/anod/buildspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ def __del__(self):

def end(self):
"""Kill the tail thread if running."""
logging.getLogger('').removeHandler(self.main_log_handler)
self.main_log_handler.close()
if self.stop_event is not None:
self.stop_event.set()
self.tail_thread.join()
Expand Down

0 comments on commit 9de5693

Please sign in to comment.