Address issue 214: munkiimport should not crash when editor is missing. Print an error message and continue.

This commit is contained in:
Greg Neagle
2013-01-28 11:40:54 -08:00
parent 6fffa1b025
commit 78810f67fc
+5 -1
View File
@@ -253,7 +253,11 @@ def openPkginfoInEditor(pkginfo_path):
cmd = ['/usr/bin/open', '-a', editor, pkginfo_path]
else:
cmd = [editor, pkginfo_path]
unused_returncode = subprocess.call(cmd)
try:
unused_returncode = subprocess.check_call(cmd)
except (OSError, subprocess.CalledProcessError), err:
print >> sys.stderr, 'Problem running editor %s: %s.' % (
editor, err)
def promptForSubdirectory(subdirectory):