Skip to content

Commit

Permalink
Exit if user passes command-line arguments
Browse files Browse the repository at this point in the history
Fixes #4.
  • Loading branch information
FWDekker committed May 24, 2023
1 parent e0b09ab commit 8851fb3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/python/facemation.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ def main() -> None:
try:
sys.excepthook = excepthook

if len(sys.argv) > 1:
raise UserException("Facemation does not support command-line arguments. "
"To configure Facemation, edit the config.py file. "
"Check the README for more information.")

freeze_support()
main()
except UserException as exception:
print(f"Error: {exception.args[0]}\n\n{error_info}", file=sys.stderr)
sys.exit(2)

0 comments on commit 8851fb3

Please sign in to comment.