Fixes elapsed time that is provided with a ',' instead of a '.' (#2104)

This commit is contained in:
StopMotionCuber 2020-06-04 08:00:00 +02:00 committed by GitHub
parent 65f968ad3a
commit 14a4100c4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,8 @@ def _convert_state(state):
def _convert_seconds(seconds):
'''Convert seconds to minutes:seconds format'''
if isinstance(seconds, str):
seconds = seconds.replace(",",".")
return '{0:.0f}:{1:02.0f}'.format(*divmod(float(seconds), 60))