aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/command.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-12-31 17:31:21 +0100
committerGitHub <noreply@github.com>2017-12-31 17:31:21 +0100
commit44d97848e502fe999acdfb680c72b72ca6033b17 (patch)
treeabdc315de12f172416cc17129bee2cb468032f28 /mitmproxy/command.py
parentd9d4d15ee0c27dda0de340716b5275d4d444d0b8 (diff)
downloadmitmproxy-44d97848e502fe999acdfb680c72b72ca6033b17.tar.gz
mitmproxy-44d97848e502fe999acdfb680c72b72ca6033b17.tar.bz2
mitmproxy-44d97848e502fe999acdfb680c72b72ca6033b17.zip
parse commands in posix mode
If posix=False, quotes are not stripped from parsed tokens.
Diffstat (limited to 'mitmproxy/command.py')
-rw-r--r--mitmproxy/command.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/command.py b/mitmproxy/command.py
index 7bb2bf8e..48968c90 100644
--- a/mitmproxy/command.py
+++ b/mitmproxy/command.py
@@ -24,7 +24,7 @@ def verify_arg_signature(f: typing.Callable, args: list, kwargs: dict) -> None:
def lexer(s):
# mypy mis-identifies shlex.shlex as abstract
- lex = shlex.shlex(s) # type: ignore
+ lex = shlex.shlex(s, posix=True) # type: ignore
lex.wordchars += "."
lex.whitespace_split = True
lex.commenters = ''