diff --git a/tool/compile_gatt.py b/tool/compile_gatt.py index 2d7c66995..5b89e7084 100755 --- a/tool/compile_gatt.py +++ b/tool/compile_gatt.py @@ -1018,7 +1018,7 @@ try: fin = codecs.open (args.gattfile, encoding='utf-8') # pass 1: create temp .h file - ftemp = tempfile.TemporaryFile() + ftemp = tempfile.TemporaryFile(mode='w+t') parse(args.gattfile, fin, filename, sys.argv[0], ftemp) listHandles(ftemp)