Unverified Commit 95fc0ec9 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

handle secs only in duration

parent 8237675e
Pipeline #18012 passed with stages
in 1 minute and 55 seconds
......@@ -245,6 +245,8 @@ def _normalize_duration(duration) -> int:
return int(split[0]) * 3600 + int(split[1]) * 60 + int(split[2])
elif re.fullmatch(r'\d+.\d{6}', str(duration), re.ASCII):
return int(duration.split('.')[0])
elif re.fullmatch(r'\d+', str(duration), re.ASCII):
return int(duration)
else:
logging.warning(f'Can\'t parse duration `{duration}`')
return 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment