Index: tools/usb_gadget/package.py |
diff --git a/tools/usb_gadget/package.py b/tools/usb_gadget/package.py |
index 069bb1477d7738e8d6a3f3152c430aed5c37c089..1c5003325662acc715c1dc9463675c2cfde0e554 100755 |
--- a/tools/usb_gadget/package.py |
+++ b/tools/usb_gadget/package.py |
@@ -82,10 +82,10 @@ def main(): |
content, md5 = MakeZip(directory=args.dir, files=args.files) |
if args.zip_file: |
- with open(args.zip_file, 'w') as zip_file: |
+ with open(args.zip_file, 'wb') as zip_file: |
zip_file.write(content) |
if args.hash_file: |
- with open(args.hash_file, 'w') as hash_file: |
+ with open(args.hash_file, 'wb') as hash_file: |
hash_file.write(md5) |
if args.upload: |
UploadZip(content, md5, args.upload) |