From 6e58f88d051067c2a833d53343fa6d27d58213f7 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 10 May 2011 00:47:41 +0200 Subject: Fix the /version command in mucs (and globaaly) & improve shlex parsing --- src/common.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common.py') diff --git a/src/common.py b/src/common.py index 03c9b6a4..6a9d4a9c 100644 --- a/src/common.py +++ b/src/common.py @@ -194,7 +194,9 @@ def datetime_tuple(timestamp): return ret def shell_split(string): - sh = shlex.shlex(string, posix=True) + sh = shlex.shlex(string, posix=False) + sh.whitespace_split = True + sh.quotes = '"' ret = list() try: w = sh.get_token() @@ -203,7 +205,7 @@ def shell_split(string): w = sh.get_token() return ret except ValueError: - return string.split() + return string.split(" ") def curses_color_pair(color): if color < 0: -- cgit v1.2.3