def wait_reset(watcher_reset_event=None): if watcher_reset_event is not None: wait_file(watcher_reset_event) EventsManager.stopEvents() time.sleep(2)