mirror of
https://github.com/munki/munki.git
synced 2026-01-06 06:29:56 -06:00
Safer handling of bytestrings when making a diskimage
This commit is contained in:
@@ -65,10 +65,10 @@ def make_dmg(pkgpath):
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
while True:
|
||||
output = proc.stdout.readline()
|
||||
output = proc.stdout.readline().decode('UTF-8')
|
||||
if not output and (proc.poll() != None):
|
||||
break
|
||||
line = output.rstrip('\n').decode('UTF-8')
|
||||
line = output.rstrip('\n')
|
||||
if line:
|
||||
print(line)
|
||||
sys.stdout.flush()
|
||||
|
||||
Reference in New Issue
Block a user