Skip to content

Commit

Permalink
Merge pull request #45 from DemocracyClub/exceptions
Browse files Browse the repository at this point in the history
throw errors from update script
  • Loading branch information
chris48s authored Nov 11, 2024
2 parents b631dce + e2018f8 commit 753a0d7
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions manage_bank_holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,11 @@
args = parser.parse_args()

if args.diff:
try:
additions_count: int = diff_bank_holidays()
print(f"No. of additions: {additions_count}")
sys.exit(additions_count)
except Exception:
print("Unable to diff files")
sys.exit(0)
additions_count: int = diff_bank_holidays()
print(f"No. of additions: {additions_count}")
sys.exit(additions_count)
elif args.update:
try:
update_bank_holidays()
print("Update complete")
except Exception as ex:
print(f"Unable to update bank-holidays.json: {ex}")
update_bank_holidays()
print("Update complete")
else:
print("No action provided. Check --help for a list of actions.")

0 comments on commit 753a0d7

Please sign in to comment.