Skip to content

Commit

Permalink
refactor: stop download if failed to fetch the creator name
Browse files Browse the repository at this point in the history
Closes #153, #151, #113
  • Loading branch information
Ljzd-PRO committed Oct 4, 2024
1 parent cfe9cb9 commit 682d334
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ktoolbox/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,14 @@ async def sync_creator(
)
)
else:
logger.warning(
logger.error(
generate_msg(
f"Failed to fetch the name of creator <{creator_id}>, use creator ID as directory name",
f"Failed to fetch the name of creator <{creator_id}>",
detail=creator_ret.message
)
)
return creator_ret.message

creator_path = path / sanitize_filename(creator_name)

creator_path.mkdir(exist_ok=True)
Expand Down

0 comments on commit 682d334

Please sign in to comment.