Better unicode text handling for subprocesses

This commit is contained in:
Greg Neagle
2019-06-24 21:53:37 -07:00
parent 647aa9c67e
commit b5bb875884
21 changed files with 67 additions and 75 deletions

View File

@@ -24,7 +24,7 @@ def launchctld(identifier):
cmd = ['/bin/launchctl', 'load', path]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, err = proc.communicate()
output = proc.communicate()[0].decode("UTF-8")
return output
except KeyError:
pass