mirror of
https://github.com/craigerl/aprsd.git
synced 2025-07-30 12:22:27 -04:00
Ensure parse_delta_str doesn't puke
This patch fixes an issue where the parse_delta_str regex doesn't match anything.
This commit is contained in:
parent
81a19dd101
commit
140fa4ace4
@ -126,4 +126,8 @@ def parse_delta_str(s):
|
||||
)
|
||||
else:
|
||||
m = re.match(r"(?P<hours>\d+):(?P<minutes>\d+):(?P<seconds>\d[\.\d+]*)", s)
|
||||
return {key: float(val) for key, val in m.groupdict().items()}
|
||||
|
||||
if m:
|
||||
return {key: float(val) for key, val in m.groupdict().items()}
|
||||
else:
|
||||
return {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user