X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomrogue%2Fparser.py;h=140637b468aea0982462a9e3a697690ee24c676d;hb=f68b1eccb0f22fc29e9fb612f65ce9c8b52023c3;hp=22e90594be8313ab514d6d346ce1b87fa498188b;hpb=c1024023126d1fd91be3145e50cae4b493d7a956;p=plomrogue2
diff --git a/plomrogue/parser.py b/plomrogue/parser.py
index 22e9059..140637b 100644
--- a/plomrogue/parser.py
+++ b/plomrogue/parser.py
@@ -84,7 +84,7 @@ class Parser:
import string
msg = msg.replace('\n', ' ') # Inserted by some tablet keyboards.
legal_chars = string.digits + string.ascii_letters +\
- string.punctuation + ' ' + 'ÃäÃöÃüç' + 'éèáà ô'
+ string.punctuation + ' ' + 'ÃäÃöÃüç' + 'éèáà ô' + 'â'
for c in msg:
if not c in legal_chars:
raise ArgError('Command/message contains illegal character(s), '
@@ -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.')