Skip to content

Commit 19123ae

Browse files
committed
edited error returns on invalid input
1 parent 578d6e9 commit 19123ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gs/backend/migrate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
if __name__ == "__main__":
77
if len(sys.argv) > 2:
8-
print("Invalid input. ")
8+
raise ValueError(f"Invalid input. Expected at most 1 argument, received {len(sys.argv)}")
99
elif len(sys.argv[1:]) == 0:
1010
print("Migrating callsign data...")
1111
add_callsigns(get_db_session())
@@ -18,4 +18,4 @@
1818
print("Migrating main command data...")
1919
add_main_commands(get_db_session())
2020
else:
21-
print("Invalid input. Optional arguments include 'callsigns' or 'commands'.")
21+
raise ValueError("Invalid input. Optional arguments include 'callsigns' or 'commands'.")

0 commit comments

Comments
 (0)