home
·
contact
·
privacy
projects
/
plomrogue2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ec2f3d
)
While rtrim() doesn't work to allow \n-trailed tablet logins, this does.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 5 Dec 2020 14:30:17 +0000
(15:30 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 5 Dec 2020 14:30:17 +0000
(15:30 +0100)
plomrogue/parser.py
patch
|
blob
|
history
diff --git
a/plomrogue/parser.py
b/plomrogue/parser.py
index 2820c186778365384be548929c2a1128f587d490..22e90594be8313ab514d6d346ce1b87fa498188b 100644
(file)
--- a/
plomrogue/parser.py
+++ b/
plomrogue/parser.py
@@
-77,9
+77,12
@@
class Parser:
"""Parse msg as call to function, return function with args tuple.
Respects function signature defined in function's .argtypes attribute.
+
+ Throws out messages with any but a small list of acceptable characters.
+
"""
import string
- msg = msg.r
strip()
+ msg = msg.r
eplace('\n', ' ') # Inserted by some tablet keyboards.
legal_chars = string.digits + string.ascii_letters +\
string.punctuation + ' ' + 'ÄäÖöÜüߧ' + 'éèáàô'
for c in msg: