In this file : all functions that do a system call, like open a browser or an editor, or call a git command
'''
-import sys
import subprocess
+from . import printcolors
-def show_in_editor(editor, filePath):
+def show_in_editor(editor, filePath, logger):
'''open filePath using editor.
:param editor str: The editor to use.
try:
# launch cmd using subprocess.Popen
cmd = editor % filePath
+ logger.write('Launched command:\n' + cmd + '\n', 5)
p = subprocess.Popen(cmd, shell=True)
p.communicate()
except:
- sys.stderr.write("Unable to edit file %s\n" % filePath)
+ logger.write(printcolors.printcError(_("Unable to edit file %s\n") % filePath), 1)
\ No newline at end of file