From 5aff41b69be43cfec31ea4b6b5c735b500fae9db Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 19 May 2011 20:38:12 +0200 Subject: Fix the argument split issues --- src/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common.py') diff --git a/src/common.py b/src/common.py index 6a9d4a9c..9435dab5 100644 --- a/src/common.py +++ b/src/common.py @@ -193,19 +193,19 @@ def datetime_tuple(timestamp): ret -= dst return ret -def shell_split(string): - sh = shlex.shlex(string, posix=False) +def shell_split(st): + sh = shlex.shlex(st, posix=True) sh.whitespace_split = True sh.quotes = '"' ret = list() try: w = sh.get_token() - while w: + while w is not None: ret.append(w) w = sh.get_token() return ret except ValueError: - return string.split(" ") + return st.split(" ") def curses_color_pair(color): if color < 0: -- cgit v1.2.3