From 5d5aad4653169cf722b7af03d8f764fc37bdc151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Joz=C3=ADfek?= Date: Wed, 8 Mar 2023 10:50:27 +0100 Subject: [PATCH] Remove unnecessary indent --- prusa/connect/printer/files.py | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/prusa/connect/printer/files.py b/prusa/connect/printer/files.py index ac1d0e3..750491b 100644 --- a/prusa/connect/printer/files.py +++ b/prusa/connect/printer/files.py @@ -719,27 +719,28 @@ def __call__(self, timeout=0): events = self.filter_delete_events(events) for event in events: # Ignore hidden files . - if not event.name.startswith("."): - parent_dir = self.wds[event.wd] - for storage in self.fs.storage_dict.values(): - if parent_dir.startswith(storage.path_storage): - storage.last_updated = time() - for flag in flags.from_mask(event.mask): - # remove wds that are no longer needed - if flag.name == "IGNORED": - del self.wds[event.wd] - continue - # ignore non watched events - if not self.WATCH_FLAGS & flag: - log.debug("Ignoring %s", flag.name) - continue - - abs_path = path.join(parent_dir, event.name) - - log.debug("Flag: %s %s %s", flag.name, abs_path, event) - handler = self.HANDLERS[flag.name] - log.debug("Calling %s: %s", handler, abs_path) - handler(self, abs_path, event.mask & flags.ISDIR) + if event.name.startswith("."): + continue + parent_dir = self.wds[event.wd] + for storage in self.fs.storage_dict.values(): + if parent_dir.startswith(storage.path_storage): + storage.last_updated = time() + for flag in flags.from_mask(event.mask): + # remove wds that are no longer needed + if flag.name == "IGNORED": + del self.wds[event.wd] + continue + # ignore non watched events + if not self.WATCH_FLAGS & flag: + log.debug("Ignoring %s", flag.name) + continue + + abs_path = path.join(parent_dir, event.name) + + log.debug("Flag: %s %s %s", flag.name, abs_path, event) + handler = self.HANDLERS[flag.name] + log.debug("Calling %s: %s", handler, abs_path) + handler(self, abs_path, event.mask & flags.ISDIR) def get_abs_os_path(self, relative_path_param): """Relative path to os path.