Merge pull request #2736 from mitmproxy/posix-commands

Parse Commands in POSIX mode
This commit is contained in:
Maximilian Hils 2018-01-18 00:50:27 +01:00 committed by GitHub
commit 8dfb8a9a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = ''