build: Be careful with unicode and byte strings for python3 compatibility.
Signed-off-by: Johannes Krampf <johannes.krampf@googlemail.com>
diff --git a/scripts/transdump.py b/scripts/transdump.py
index 4caaeb7..665f04a 100755
--- a/scripts/transdump.py
+++ b/scripts/transdump.py
@@ -44,7 +44,10 @@
filehdl = open(filename, 'r')
mem = parseMem(filehdl)
for i in mem:
- sys.stdout.write(struct.pack("<I", i))
+ if (sys.version_info > (3, 0)):
+ sys.stdout.buffer.write(struct.pack("<I", i))
+ else:
+ sys.stdout.write(struct.pack("<I", i))
if __name__ == '__main__':
main()