summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2010-11-07 09:20:33 -0500
committerCatherine Devlin <catherine.devlin@gmail.com>2010-11-07 09:20:33 -0500
commit142c4458eed9ccc23fb0ebbaf6d1ce0b03c7ea44 (patch)
tree6b3e18bd84d7a90afd5c7a69bd46f17d2230faa0
parent1a83647c325f94453c840031ec01dd7176993072 (diff)
parent745b6f0e3cc3b7952773b64b53b1de6b5ca55aac (diff)
downloadcmd2-git-142c4458eed9ccc23fb0ebbaf6d1ce0b03c7ea44.tar.gz
merged
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 8c63f6db..ff9adff3 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -424,7 +424,7 @@ class Cmd(cmd.Cmd):
editor = 'notepad'
else:
for editor in ['gedit', 'kate', 'vim', 'emacs', 'nano', 'pico']:
- if not os.system('which %s' % (editor)):
+ if not subprocess.Popen(['which', editor], stdout=subprocess.PIPE).communicate()[0]:
break
colorcodes = {'bold':{True:'\x1b[1m',False:'\x1b[22m'},