This works OK on Windows too.

This commit is contained in:
L. Kärkkäinen 2020-03-31 04:32:18 -07:00
parent 1bf7e2f1b0
commit c1bab69f38

View File

@ -1118,11 +1118,6 @@ class Sanic:
auto_reload = kwargs.get("auto_reload", auto_reload) auto_reload = kwargs.get("auto_reload", auto_reload)
if auto_reload: if auto_reload:
if os.name != "posix":
# This condition must be removed after implementing
# auto reloader for other operating systems.
raise NotImplementedError
if os.environ.get("SANIC_SERVER_RUNNING") != "true": if os.environ.get("SANIC_SERVER_RUNNING") != "true":
return reloader_helpers.watchdog(2) return reloader_helpers.watchdog(2)