summaryrefslogtreecommitdiff
path: root/src/common.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-08-05 19:45:08 +0200
committermathieui <mathieui@mathieui.net>2013-08-05 19:45:08 +0200
commit406454fdd03c0984a7d4754da71a3e14f3562293 (patch)
tree198acd79a7ee3ab580a710bb5893aa48b30c100c /src/common.py
parent90161f81acf1df75503246cedde120fe403bec27 (diff)
downloadpoezio-406454fdd03c0984a7d4754da71a3e14f3562293.tar.gz
poezio-406454fdd03c0984a7d4754da71a3e14f3562293.tar.bz2
poezio-406454fdd03c0984a7d4754da71a3e14f3562293.tar.xz
poezio-406454fdd03c0984a7d4754da71a3e14f3562293.zip
Fix common.shell_split with empty strings
Diffstat (limited to 'src/common.py')
-rw-r--r--src/common.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common.py b/src/common.py
index 25950987..c438270f 100644
--- a/src/common.py
+++ b/src/common.py
@@ -232,6 +232,12 @@ def shell_split(st):
>>> shell_split('"sdf 1" "toto 2"')
['sdf 1', 'toto 2']
+ >>> shell_split('toto "titi"')
+ ['toto', 'titi']
+ >>> shell_split('toto ""')
+ ['toto', '']
+ >>> shell_split('"toto titi" toto ""')
+ ['toto titi', 'toto', '']
"""
sh = shlex.shlex(st)
ret = []