mirror of
https://github.com/Free-TV/IPTV.git
synced 2026-10-23 00:04:59 +02:00
Replace if check with mkdir exist_ok
This commit is contained in:
+1
-2
@@ -140,8 +140,7 @@ def main(): # pylint: disable=too-many-locals
|
|||||||
lists_dir = base_dir / "lists"
|
lists_dir = base_dir / "lists"
|
||||||
dir_playlists = base_dir / "playlists"
|
dir_playlists = base_dir / "playlists"
|
||||||
|
|
||||||
if not dir_playlists.is_dir():
|
dir_playlists.mkdir(exist_ok=True)
|
||||||
dir_playlists.mkdir()
|
|
||||||
|
|
||||||
with open(base_dir / "epglist.txt", encoding='utf-8') as epg_file:
|
with open(base_dir / "epglist.txt", encoding='utf-8') as epg_file:
|
||||||
epg_urls = [line.strip() for line in epg_file if line.strip()]
|
epg_urls = [line.strip() for line in epg_file if line.strip()]
|
||||||
|
|||||||
Reference in New Issue
Block a user