mirror of
https://github.com/munki/munki.git
synced 2026-05-04 11:29:16 -05:00
Address issue 214: munkiimport should not crash when editor is missing. Print an error message and continue.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user