From: Mark Wooding Date: Sat, 13 Jun 2020 15:49:47 +0000 (+0100) Subject: py/tripe.py.in: Raise an error if a command token contains a newline. X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/5b97ed7d0373f195b8fcccbc264b5520052e49c5 py/tripe.py.in: Raise an error if a command token contains a newline. This should never happen, and it confuses the client quite badly if it does. --- diff --git a/py/tripe.py.in b/py/tripe.py.in index a9be6687..db194e29 100644 --- a/py/tripe.py.in +++ b/py/tripe.py.in @@ -446,6 +446,9 @@ class TripeCommand (object): def __init__(me, words): """Make a new command consisting of the given list of WORDS.""" + for word in words: + if '\n' in word: + raise TripeInternalError("command word contains newline") me.words = words class TripeSynchronousCommand (TripeCommand):