Failed to commit Dice changes in earlier commit
This commit is contained in:
parent
0fc770f261
commit
07e2ef3ab2
2 changed files with 12 additions and 4 deletions
4
dice.py
4
dice.py
|
@ -17,7 +17,7 @@ class Dice():
|
|||
# All of the dark regex magic is contained to this function,
|
||||
# lest it corrupt innocent code
|
||||
@classmethod
|
||||
def from_desc(cls, desc):
|
||||
def from_str(cls, desc):
|
||||
if not re.match(r'^\d+d\d+', desc):
|
||||
raise Exception('Dice format invalid. See --help')
|
||||
|
||||
|
@ -139,7 +139,7 @@ class Dice():
|
|||
def parse_input(args):
|
||||
dice_list = []
|
||||
for arg in args:
|
||||
dice_list.append(Dice.from_desc(arg))
|
||||
dice_list.append(Dice.from_str(arg))
|
||||
|
||||
return dice_list
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue