Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danamzulescu-codefresh committed Apr 12, 2023
1 parent 94e849c commit e48acb0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import sys

from constants import DEVBOT_TASKS
from helpers.logging_functions import handle_error
from services.dev_bot_svc import DevBotService

if __name__ == '__main__':
try:
# if len(sys.argv) < 2 or sys.argv[1] not in DEVBOT_TASKS:
# print("Error: Please provide an argument ('dev' or 'merge').")
# exit(-1)
if len(sys.argv) < 2 or sys.argv[1] not in DEVBOT_TASKS:
handle_error("Please provide an argument ('dev' or 'merge').")
devbot = DevBotService()
# devbot.run(sys.argv[1])
devbot.run("dev")
devbot.run(sys.argv[1])
except Exception as e:
print("Error: ", e)
exit(-1)
Expand Down

0 comments on commit e48acb0

Please sign in to comment.