aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2021-09-09 10:11:47 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2021-09-09 10:12:33 +0200
commit0cece58b291adf043266dae0cf38369e76dd9589 (patch)
tree81c0d52a0dfb897fc63f421342774b90fb5e7782
parentc7a18cedc0c3b70d97b5a842617f1979a6b1fa62 (diff)
downloadgeldschieberbot-0cece58b291adf043266dae0cf38369e76dd9589.tar.gz
geldschieberbot-0cece58b291adf043266dae0cf38369e76dd9589.zip
[tanken] specify expected Errors
-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