Compare commits
No commits in common. "5c6783452d4aded258b629181817e89f8cf839f9" and "76f0a4cdd41e14e92a615c6bead105b2e1e33c7c" have entirely different histories.
5c6783452d
...
76f0a4cdd4
1 changed files with 3 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
from asyncio import run_coroutine_threadsafe
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Sequence
|
||||
from typing import Sequence
|
||||
|
||||
from red_commons.logging import RedTraceLogger, getLogger
|
||||
from redbot.core import Config, checks, commands
|
||||
|
@ -8,10 +8,7 @@ from redbot.core.bot import Red
|
|||
from redbot.core.core_commands import CoreLogic
|
||||
from redbot.core.utils.chat_formatting import bold, box, humanize_list
|
||||
from watchdog.events import FileSystemEvent, FileSystemMovedEvent, RegexMatchingEventHandler
|
||||
from watchdog.observers import Observer
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from watchdog.observers import ObserverType
|
||||
from watchdog.observers import Observer, ObserverType
|
||||
|
||||
|
||||
class HotReload(commands.Cog):
|
||||
|
@ -19,7 +16,7 @@ class HotReload(commands.Cog):
|
|||
|
||||
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||
__version__ = "1.3.2"
|
||||
__version__ = "1.3.0"
|
||||
__documentation__ = "https://seacogs.coastalcommits.com/hotreload/"
|
||||
|
||||
def __init__(self, bot: Red) -> None:
|
||||
|
@ -73,10 +70,6 @@ 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.")
|
||||
|
|
Loading…
Add table
Reference in a new issue