diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-01-12 11:20:10 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-01-12 11:20:10 +0100 |
| commit | 677bca872e31e295aeba0a14fde5b4ec81983358 (patch) | |
| tree | 05f4eded45a5ba3609af0c22f2120b217190b6c2 /tidal_dl_ng/helper/path.py | |
| parent | 87091fb060ec263c1e9cfa71c086c995c85e65cc (diff) | |
| download | tidal-dl-ng-677bca872e31e295aeba0a14fde5b4ec81983358.tar.gz | |
🛠️ Ruff errors refactored.
Diffstat (limited to 'tidal_dl_ng/helper/path.py')
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index 31e9a88..3061160 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -111,7 +111,7 @@ def get_fn_format(media: Track | Album | Playlist | UserPlaylist | Video | Mix) result = format_str_track elif isinstance(media, Album): result = format_str_album - elif isinstance(media, (Playlist, UserPlaylist)): + elif isinstance(media, Playlist | UserPlaylist): result = format_str_playlist elif isinstance(media, Mix): result = format_str_mix @@ -128,8 +128,9 @@ def length_max_name_file() -> int: try: if system in ["Darwin", "Linux"]: result: int = os.pathconf("/", "PC_NAME_MAX") - except Exception: - pass + except Exception as e: + # TODO: Implement propper logging. + print(e) return result @@ -141,8 +142,9 @@ def length_max_name_path() -> int: try: if system in ["Darwin", "Linux"]: result: int = os.pathconf("/", "PC_PATH_MAX") - except Exception: - pass + except Exception as e: + # TODO: Implement propper logging. + print(e) return result |
