summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-11 08:37:58 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 10:26:50 (GMT)
commit7a643996dfa80d5b90d42fe81d7866a019aeedc1 (patch)
treee4a559911edb7d4e2cf3a0d262adec7fb8fc6a9d
parent62cbdaf3c3529d5ed8ade937e4642f02bac0b087 (diff)
--game=555/ now gives a better error message
-rw-r--r--src/game.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game.py b/src/game.py
index 5f433e0..5ee9d07 100644
--- a/src/game.py
+++ b/src/game.py
@@ -144,7 +144,7 @@ class HandId(object):
stringIdx 0 is the part in front of ..
stringIdx 1 is the part after ..
"""
- # pylint: disable=too-many-return-statements
+ # pylint: disable=too-many-return-statements,too-many-branches
if not string:
return
seed = int(string.split('/')[0])
@@ -154,8 +154,10 @@ class HandId(object):
if stringIdx == 1:
self.roundsFinished = 100
return
- string = string.split('/')[1]
- parts = string.split('..')
+ string1 = string.split('/')[1]
+ if not string1:
+ logException('--game=%s must specify the wanted round' % string)
+ parts = string1.split('..')
if stringIdx == 1 and len(parts) == 2 and parts[1] == '':
self.roundsFinished = 100
return