Reload source on .json changes

This commit is contained in:
shortcutme 2016-11-18 20:02:03 +01:00
parent 4413f77ba9
commit d7ff49c4c7

View file

@ -39,7 +39,7 @@ class DebugReloader:
def changed(self, evt): def changed(self, evt):
if ( if (
not evt.path or "%s/" % config.data_dir in evt.path or not evt.path or "%s/" % config.data_dir in evt.path or
not evt.path.endswith("py") or (not evt.path.endswith("py") and not evt.path.endswith("json")) or
time.time() - self.last_chaged < 1 time.time() - self.last_chaged < 1
): ):
return False # Ignore *.pyc changes and no reload within 1 sec return False # Ignore *.pyc changes and no reload within 1 sec