summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmd2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 4da1c7f9..d7a4d34d 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -2659,7 +2659,8 @@ Usage: Usage: unalias [-a] name [name ...]
tokens[index] = strip_quotes(tokens[index])
tokens[index] = os.path.expandvars(tokens[index])
tokens[index] = os.path.expanduser(tokens[index])
- tokens[index] = shlex.quote(tokens[index])
+ if six.PY3:
+ tokens[index] = shlex.quote(tokens[index])
expanded_command = ' '.join(tokens)
proc = subprocess.Popen(expanded_command, stdout=self.stdout, shell=True)