diff --git a/PFERD/authenticators.py b/PFERD/authenticators.py index 5537cc1..f85c9d3 100644 --- a/PFERD/authenticators.py +++ b/PFERD/authenticators.py @@ -14,7 +14,7 @@ PRETTY = PrettyLogger(LOGGER) try: import keyring except ImportError: - PRETTY.warning("Keyring module not found, KeyringAuthenticator won't work!") + pass class TfaAuthenticator: diff --git a/PFERD/ilias/crawler.py b/PFERD/ilias/crawler.py index 4d59dbf..86bf045 100644 --- a/PFERD/ilias/crawler.py +++ b/PFERD/ilias/crawler.py @@ -282,9 +282,12 @@ class IliasCrawler: continue rest_of_name = meeting_name.removeprefix(date_portion_str) - new_name = datetime.datetime.strftime(date_portion, "%Y-%m-%d, %H:%M") + rest_of_name + new_name = datetime.datetime.strftime(date_portion, "%Y-%m-%d, %H:%M") \ + + rest_of_name new_path = Path(folder_path, _sanitize_path_name(new_name)) - result += [IliasCrawlerEntry(new_path, abs_url, IliasElementType.REGULAR_FOLDER, None)] + result += [ + IliasCrawlerEntry(new_path, abs_url, IliasElementType.REGULAR_FOLDER, None) + ] elif element_type is not None: result += [IliasCrawlerEntry(element_path, abs_url, element_type, None)] else: diff --git a/PFERD/logging.py b/PFERD/logging.py index 76741f7..c25019e 100644 --- a/PFERD/logging.py +++ b/PFERD/logging.py @@ -3,13 +3,10 @@ Contains a few logger utility functions and implementations. """ import logging -from pathlib import Path -from typing import List, Optional +from typing import Optional -from rich import print as rich_print from rich._log_render import LogRender from rich.console import Console -from rich.panel import Panel from rich.style import Style from rich.text import Text from rich.theme import Theme diff --git a/PFERD/organizer.py b/PFERD/organizer.py index a15e751..fe5052b 100644 --- a/PFERD/organizer.py +++ b/PFERD/organizer.py @@ -116,7 +116,7 @@ class Organizer(Location): if self._is_marked(dst): PRETTY.warning(f"File {str(dst_absolute)!r} was already written!") conflict = ConflictType.MARKED_FILE_OVERWRITTEN - if self._resolve_conflict(f"Overwrite file?", dst_absolute, conflict, default=False): + if self._resolve_conflict("Overwrite file?", dst_absolute, conflict, default=False): PRETTY.ignored_file(dst_absolute, "file was written previously") return None