Skip to content

Commit

Permalink
use SystemExit
Browse files Browse the repository at this point in the history
  • Loading branch information
xjunko committed Nov 10, 2024
1 parent 9a5cdab commit 760b447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/objects/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def from_file(cls, file: Path) -> Self | None:
print(MISSING_FILE)
print(SOLUTION_API_V1)
print(SOLUTION_API_V2)
exit(1)
raise SystemExit(1)

# Read values
lines: list[str] = [
Expand All @@ -93,7 +93,7 @@ def from_file(cls, file: Path) -> Self | None:
print(EMPTY_FILE)
print(SOLUTION_API_V1)
print(SOLUTION_API_V2)
exit(1)
raise SystemExit(1)

# V1
if len(lines) == 1:
Expand All @@ -107,4 +107,4 @@ def from_file(cls, file: Path) -> Self | None:
print("[API] Invalid api key file.")
print(SOLUTION_API_V1)
print(SOLUTION_API_V2)
exit(1)
raise SystemExit(1)
2 changes: 1 addition & 1 deletion app/objects/beatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def from_id(cls, id: int):
print(
"[API] If this is a custom beatmap, please pass the beatmap path with `-b` param.",
)
exit(1)
raise SystemExit(1)

print(" success!")
beatmap_file.write_bytes(res.content)
Expand Down

0 comments on commit 760b447

Please sign in to comment.