]> granicus.if.org Git - esp-idf/commitdiff
partition_table: Fix encoding for Python 2.7.3
authorRoland Dobai <dobai.roland@gmail.com>
Thu, 20 Sep 2018 10:01:54 +0000 (12:01 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Thu, 20 Sep 2018 10:01:54 +0000 (12:01 +0200)
struct.pack can handle Unicode argument in latest Python 2.7 but cannot
(at least) in 2.7.3.

components/partition_table/gen_esp32part.py

index cc748b9f1b054cd11786009e10f7bcf88771045f..7d7f34ad48ae607e4b46d30ee5b746aec45a14e9 100755 (executable)
@@ -355,7 +355,7 @@ class PartitionDefinition(object):
         if self.name in all_subtype_names and SUBTYPES.get(self.type, {}).get(self.name, "") != self.subtype:
             critical("WARNING: Partition has name '%s' which is a partition subtype, but this partition has non-matching type 0x%x and subtype 0x%x. Mistake in partition table?" % (self.name, self.type, self.subtype))
 
-    STRUCT_FORMAT = "<2sBBLL16sL"
+    STRUCT_FORMAT = b"<2sBBLL16sL"
 
     @classmethod
     def from_binary(cls, b):