summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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'},