From 0b1fce8a6d498bd0cc8a3f01c59e4f607853661c Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 11 May 2024 18:01:14 -0400 Subject: [PATCH] file_manager: minor type checking fixes Signed-off-by: Eric Callahan --- moonraker/components/file_manager/file_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moonraker/components/file_manager/file_manager.py b/moonraker/components/file_manager/file_manager.py index 45d69aa..b8ad71d 100644 --- a/moonraker/components/file_manager/file_manager.py +++ b/moonraker/components/file_manager/file_manager.py @@ -615,6 +615,8 @@ class FileManager: ): action = "modify_file" op_func = shutil.copy2 + else: + raise self.server.error(f"Invalid endpoint {ep}") self.sync_lock.setup(action, dest_path, move_copy=True) try: full_dest = await self.event_loop.run_in_thread( @@ -1961,7 +1963,7 @@ class InotifyObserver(BaseFileSystemObserver): def _handle_move_timeout(self, cookie: int, is_dir: bool): if cookie not in self.pending_moves: return - parent_node, name, hdl = self.pending_moves.pop(cookie) + parent_node, name, _ = self.pending_moves.pop(cookie) item_path = os.path.join(parent_node.get_path(), name) root = parent_node.get_root() self.clear_metadata(root, item_path, is_dir)