Only enable source code reloading for normal action

This commit is contained in:
shortcutme 2017-10-03 14:55:28 +02:00
parent 32ca6ac1a7
commit 20e3dc5fa7
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -23,10 +23,11 @@ class DebugReloader:
if pyfilesystem: if pyfilesystem:
self.directory = directory self.directory = directory
self.callback = callback self.callback = callback
logging.debug("Adding autoreload: %s, cb: %s" % (directory, callback)) if config.action == "main":
thread = threading.Thread(target=self.addWatcher) logging.debug("Adding autoreload: %s, cb: %s" % (directory, callback))
thread.daemon = True thread = threading.Thread(target=self.addWatcher)
thread.start() thread.daemon = True
thread.start()
def addWatcher(self, recursive=True): def addWatcher(self, recursive=True):
try: try: