Skip to content

Commit

Permalink
Return -1 if time is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Divkix committed Feb 27, 2023
1 parent 1080dd3 commit aeac712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypers/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ def get_time_in_seconds(time: str) -> int:
}
# Check if last char is in the times dictionary
if not time[-1].lower() in times:
return 0
return -1
return int(time[:-1]) * times[time[-1]]

0 comments on commit aeac712

Please sign in to comment.