[clipfish] Modernize

This commit is contained in:
Philipp Hagemeister 2014-03-24 22:30:32 +01:00
parent fb8ae2d438
commit ba40a74666
2 changed files with 17 additions and 22 deletions

View file

@ -1186,7 +1186,7 @@ def parse_duration(s):
return None
m = re.match(
r'(?:(?:(?P<hours>[0-9]+)[:h])?(?P<mins>[0-9]+)[:m])?(?P<secs>[0-9]+)s?$', s)
r'(?:(?:(?P<hours>[0-9]+)[:h])?(?P<mins>[0-9]+)[:m])?(?P<secs>[0-9]+)s?(?::[0-9]+)?$', s)
if not m:
return None
res = int(m.group('secs'))