clean exit
This commit is contained in:
@@ -62,6 +62,11 @@ class User:
|
||||
|
||||
for lst in filter(lambda x: not self.lists[x].is_file(), ["master", "push"]):
|
||||
self.lists[lst].touch()
|
||||
for lst in filter(
|
||||
lambda x: not self.lists[x].is_file(),
|
||||
["instagram", "kemono", "main"],
|
||||
):
|
||||
self.lists[lst].touch()
|
||||
|
||||
def append_list(self, name: str, line: str) -> None:
|
||||
"""Appends a line into the given list"""
|
||||
|
||||
@@ -74,6 +74,9 @@ def parse_gallery(gdl_list: str, user: User) -> None:
|
||||
"""Processes the gallery-dl command based on the selected gallery"""
|
||||
args = get_args()
|
||||
list_path = user.lists[gdl_list]
|
||||
if not list_path.is_file():
|
||||
LOG.warning("List file missing: %s", list_path)
|
||||
return
|
||||
with open(list_path, "r", encoding="utf-8") as r_file:
|
||||
links = list(map(lambda x: x.rstrip(), r_file))
|
||||
for link in filter(None, links):
|
||||
|
||||
Reference in New Issue
Block a user