mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-10 19:37:18 +00:00
Fix DirectoryMonitor.stop() raising unhandled KeyError on rm -rf workdir
This commit is contained in:
parent
0e4be3c22f
commit
b955a570fd
@ -71,7 +71,9 @@ class SourceCodeEventHandler(TriggerlessEventHandler):
|
||||
return self._monitor
|
||||
|
||||
def reload_monitor(self):
|
||||
if self._monitor: self._monitor.stop()
|
||||
if self._monitor:
|
||||
try: self._monitor.stop()
|
||||
except KeyError: logging.debug('Working directory was removed – ignoring...')
|
||||
self._monitor = DirectoryMonitor(self.filemanager.workdir)
|
||||
self._monitor.watch() # This runs on a separate thread
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user