mirror of
https://github.com/munki/munki.git
synced 2026-04-23 21:40:25 -05:00
munkiimport: When encoding text to be printed, use UTF-8 explictly instead of the current stdout encoding, which could be ASCII. Matches earlier munkiimport behavior.
This commit is contained in:
@@ -108,7 +108,7 @@ def make_dmg(pkgpath):
|
||||
output = proc.stdout.readline()
|
||||
if not output and (proc.poll() != None):
|
||||
break
|
||||
print output.rstrip('\n').encode(sys.stdout.encoding)
|
||||
print output.rstrip('\n').encode('UTF-8')
|
||||
sys.stdout.flush()
|
||||
retcode = proc.poll()
|
||||
if retcode:
|
||||
@@ -676,7 +676,7 @@ def make_catalogs():
|
||||
if not output and (proc.poll() != None):
|
||||
break
|
||||
if VERBOSE:
|
||||
print output.rstrip('\n').encode(sys.stdout.encoding)
|
||||
print output.rstrip('\n').encode('UTF-8')
|
||||
|
||||
errors = proc.stderr.read()
|
||||
if errors:
|
||||
@@ -957,7 +957,7 @@ def main():
|
||||
for (name, key) in fields:
|
||||
print '%21s: %s' % (
|
||||
name, matchingpkginfo.get(key, '').encode(
|
||||
sys.stdout.encoding))
|
||||
'UTF-8'))
|
||||
print
|
||||
if exactmatch:
|
||||
answer = raw_input('Import this item anyway? [y/n] ')
|
||||
@@ -1005,7 +1005,7 @@ def main():
|
||||
if kind == 'bool':
|
||||
default = str(pkginfo.get(key, False))
|
||||
else:
|
||||
default = pkginfo.get(key, '').encode(sys.stdout.encoding)
|
||||
default = pkginfo.get(key, '').encode('UTF-8')
|
||||
pkginfo[key] = raw_input_with_default(prompt, default)
|
||||
if kind == 'bool':
|
||||
value = pkginfo[key].lower().strip()
|
||||
|
||||
Reference in New Issue
Block a user