Skip to content
Permalink
Browse files

overpass_query: seconds can be negative

Fixes <#127>.
  • Loading branch information...
vmiklos committed Aug 14, 2019
1 parent 2ab389a commit 97c394e9582d33f22f0aadd250f68ba21b1e45b6
Showing with 3 additions and 1 deletion.
  1. +3 −1 overpass_query.py
@@ -34,7 +34,9 @@ def overpass_query_need_sleep() -> int:
for line in status.splitlines():
if line.startswith("Slot available after:"):
# Wait one more second just to be safe.
sleep = int(re.sub(r".*in (\d+) seconds.*", r"\1", line.strip())) + 1
sleep = int(re.sub(r".*in (-?\d+) seconds.*", r"\1", line.strip())) + 1
if sleep <= 0:
sleep = 1
elif "available now" in line:
available = True
if available:

0 comments on commit 97c394e

Please sign in to comment.
You can’t perform that action at this time.