From 62c5db50d4c2cbf1311efc82a9fdd50d642890a4 Mon Sep 17 00:00:00 2001 From: Gerardo Zinno Date: Sun, 11 Oct 2026 18:40:28 +0200 Subject: [PATCH] Replace if check with mkdir exist_ok --- make_playlist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/make_playlist.py b/make_playlist.py index 2f4a637..a9764c7 100755 --- a/make_playlist.py +++ b/make_playlist.py @@ -140,8 +140,7 @@ def main(): # pylint: disable=too-many-locals lists_dir = base_dir / "lists" dir_playlists = base_dir / "playlists" - if not dir_playlists.is_dir(): - dir_playlists.mkdir() + dir_playlists.mkdir(exist_ok=True) with open(base_dir / "epglist.txt", encoding='utf-8') as epg_file: epg_urls = [line.strip() for line in epg_file if line.strip()]