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
commit6a1f4fc5c6ec5159f6302844525134b04d138b0a (patch)
tree6b3e18bd84d7a90afd5c7a69bd46f17d2230faa0
parent34471c1e51cfde2c61bfd1af4fce6bcde5e06178 (diff)
parent93937d66faac900bffa212a45dec23b070ce0c01 (diff)
downloadcmd2-hg-6a1f4fc5c6ec5159f6302844525134b04d138b0a.tar.gz
merged
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 8c63f6d..ff9adff 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'},