Some attempts to remove possible unicode issues

This commit is contained in:
Greg Neagle
2016-10-17 10:49:43 -07:00
parent 834796e967
commit f3ee1d83e4

View File

@@ -853,7 +853,7 @@ def DMGisWritable(dmgpath):
(out, err) = proc.communicate()
if err:
print >> sys.stderr, (
'hdiutil error %s with image %s.' % (err, dmgpath))
u'hdiutil error %s with image %s.' % (err, dmgpath))
(pliststr, out) = getFirstPlist(out)
if pliststr:
try:
@@ -876,7 +876,7 @@ def DMGhasSLA(dmgpath):
(out, err) = proc.communicate()
if err:
print >> sys.stderr, (
'hdiutil error %s with image %s.' % (err, dmgpath))
u'hdiutil error %s with image %s.' % (err, dmgpath))
(pliststr, out) = getFirstPlist(out)
if pliststr:
try:
@@ -901,7 +901,7 @@ def hdiutilInfo():
bufsize=-1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(out, err) = proc.communicate()
if err:
print >> sys.stderr, 'hdiutil info error: %s' % err
print >> sys.stderr, u'hdiutil info error: %s' % err
(pliststr, out) = getFirstPlist(out)
if pliststr:
try:
@@ -2463,7 +2463,7 @@ def getConditions():
except utils.ScriptNotFoundError:
pass # script is not required, so pass
except utils.RunExternalScriptError, err:
print >> sys.stderr, str(err)
print >> sys.stderr, unicode(err)
else:
# /usr/local/munki/conditions does not exist
pass