diff --git a/hotreload/hotreload.py b/hotreload/hotreload.py index 67b7145..34a5073 100644 --- a/hotreload/hotreload.py +++ b/hotreload/hotreload.py @@ -19,7 +19,7 @@ class HotReload(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.3.1" + __version__ = "1.3.2" __documentation__ = "https://seacogs.coastalcommits.com/hotreload/" def __init__(self, bot: Red) -> None: @@ -73,6 +73,10 @@ class HotReload(commands.Cog): self.logger.debug("Stopped hanging observer.") continue for path in paths: + if not path.exists(): + self.logger.warning("Path %s does not exist. Skipping.", path) + continue + self.logger.debug("Adding observer schedule for path %s.", path) observer.schedule(event_handler=HotReloadHandler(cog=self, path=path), path=path, recursive=True) observer.start() self.logger.info("Started observer. Watching for file changes.")