summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2018-04-13 16:40:09 +0000
committerNathan Kinkade <nath@nkinka.de>2018-04-13 16:40:09 +0000
commit822eb74c839e30b123d4bfa6421ed843e7c439b9 (patch)
treea4a8e7bc37f5b809bbf3f671f5e9909d51eb4073
parent383c2f6c536fd0caed05ed79a7f7cfd996ba8af0 (diff)
Fixes a bug where a KeyError stopped the loop as opposed to continuing with next iteration.HEADmaster
-rwxr-xr-xscrape_trucks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scrape_trucks.py b/scrape_trucks.py
index 99131a7..2ba1d20 100755
--- a/scrape_trucks.py
+++ b/scrape_trucks.py
@@ -65,11 +65,11 @@ def main(limit):
try:
if limit:
limited = limits[limit]
- try:
- for location in limited:
+ for location in limited:
+ try:
response['locations'][location] = locations[location]
- except KeyError:
- pass
+ except KeyError:
+ continue
else:
response['locations'] = locations
except: