X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;ds=sidebyside;f=plomrogue%2Fparser.py;h=140637b468aea0982462a9e3a697690ee24c676d;hb=f68b1eccb0f22fc29e9fb612f65ce9c8b52023c3;hp=05c830ff8552c216b81924c46244067717e478a4;hpb=1b0d4f5fef925f2f7811fd32be1c773ab813c49e;p=plomrogue2 diff --git a/plomrogue/parser.py b/plomrogue/parser.py index 05c830f..140637b 100644 --- a/plomrogue/parser.py +++ b/plomrogue/parser.py @@ -127,6 +127,11 @@ class Parser: if not arg.isdigit() or int(arg) < 1: raise ArgError('Argument must be positive integer.') args += [int(arg)] + elif tmpl == 'int': + try: + args += [int(arg)] + except ValueError: + raise ArgError('Argument must be integer.') elif tmpl == 'bool': if not arg.isdigit() or int(arg) not in (0, 1): raise ArgError('Argument must be 0 or 1.')