Lots of Python 3 compatibility changes for munkilib

This commit is contained in:
Greg Neagle
2019-06-22 22:19:39 -07:00
parent 2f7b6c1a43
commit 0dddb5dbd5
28 changed files with 167 additions and 131 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ def runExternalScript(script, allow_insecure=False, script_args=()):
stderr=subprocess.PIPE)
except (OSError, IOError) as err:
raise RunExternalScriptError(
'Error %s when attempting to run %s' % (unicode(err), script))
u'Error %s when attempting to run %s' % (err, script))
(stdout, stderr) = proc.communicate()
return (proc.returncode, stdout.decode('UTF-8', 'replace'),
stderr.decode('UTF-8', 'replace'))