aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tanken.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tanken.py b/tanken.py
index 303e3b3..b19fb53 100644
--- a/tanken.py
+++ b/tanken.py
@@ -10,7 +10,7 @@ def tanken(drives, cost, service_charge=0):
for d in drives:
try:
d[0] = int(d[0])
- except:
+ except (IndexError, ValueError):
return None, "Lines have to start with the driven distance!"
# calculate overall distance