From ca7392ee8d3219eca7de1838fcba1f5478bee419 Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Tue, 23 Jul 2019 16:41:49 -0700 Subject: [PATCH] Safer handling of bytestrings when making a diskimage --- code/client/munkiimport | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/client/munkiimport b/code/client/munkiimport index 44e3e8f3..c96e19f9 100755 --- a/code/client/munkiimport +++ b/code/client/munkiimport @@ -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()