Skip to content

Commit

Permalink
deb: fix entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Sep 25, 2024
1 parent f803465 commit c508bf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -euxo pipefail

poetry install
poetry run pip freeze > requirements.txt
poetry run pex . -o robot_failover.pex -e robot_failover:main -r requirements.txt --python python3.11
poetry run pex . -o robot_failover.pex -e robot_failover:cli -r requirements.txt --python python3.11
5 changes: 4 additions & 1 deletion robot_failover.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,8 @@ def main(arg_vrouter, arg_type, arg_name, arg_endstate):
config.dummy_interface if 'dummy_interface' in config and config.dummy_interface else False)
).start()

if __name__ == "__main__":
def cli():
main(arg_vrouter=int(sys.argv[1]), arg_type=sys.argv[2], arg_name=sys.argv[3], arg_endstate=sys.argv[4])

if __name__ == "__main__":
cli()

0 comments on commit c508bf2

Please sign in to comment.