mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
partition_table: Fix pylint issues in gen_esp32part.py
This commit is contained in:
@@ -115,15 +115,15 @@ class PartitionTable(list):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_file(cls, f):
|
def from_file(cls, f):
|
||||||
input = f.read()
|
data = f.read()
|
||||||
input_is_binary = input[0:2] == PartitionDefinition.MAGIC_BYTES
|
data_is_binary = data[0:2] == PartitionDefinition.MAGIC_BYTES
|
||||||
if input_is_binary:
|
if data_is_binary:
|
||||||
status('Parsing binary partition input...')
|
status('Parsing binary partition input...')
|
||||||
return cls.from_binary(input), True
|
return cls.from_binary(data), True
|
||||||
else:
|
|
||||||
input = input.decode()
|
data = data.decode()
|
||||||
status('Parsing CSV input...')
|
status('Parsing CSV input...')
|
||||||
return cls.from_csv(input), False
|
return cls.from_csv(data), False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_csv(cls, csv_contents):
|
def from_csv(cls, csv_contents):
|
||||||
@@ -186,7 +186,7 @@ class PartitionTable(list):
|
|||||||
None if not found """
|
None if not found """
|
||||||
# convert ptype & subtypes names (if supplied this way) to integer values
|
# convert ptype & subtypes names (if supplied this way) to integer values
|
||||||
ptype = get_ptype_as_int(ptype)
|
ptype = get_ptype_as_int(ptype)
|
||||||
subtype = get_subtype_as_int(subtype)
|
subtype = get_subtype_as_int(ptype, subtype)
|
||||||
|
|
||||||
for p in self:
|
for p in self:
|
||||||
if p.type == ptype and p.subtype == subtype:
|
if p.type == ptype and p.subtype == subtype:
|
||||||
|
Reference in New Issue
Block a user