Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit b09b667

Browse files
committed
fix: Ensure stdout is py2/3 compatible
1 parent ad82c61 commit b09b667

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def fix(self, to_file=None):
7474
result = self.packer_cmd()
7575
if to_file:
7676
with open(to_file, 'w') as f:
77-
f.write(result.stdout)
78-
result.fixed = json.loads(result.stdout)
77+
f.write(result.stdout.decode())
78+
result.fixed = json.loads(result.stdout.decode())
7979
return result
8080

8181
def inspect(self, mrf=True):
@@ -115,7 +115,7 @@ def inspect(self, mrf=True):
115115

116116
result = self.packer_cmd()
117117
if mrf:
118-
result.parsed_output = self._parse_inspection_output(result.stdout)
118+
result.parsed_output = self._parse_inspection_output(result.stdout.decode())
119119
else:
120120
result.parsed_output = None
121121
return result

0 commit comments

Comments
 (0)