mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Fix PartitionDefinition comparison in Python 3
Merges https://github.com/espressif/esp-idf/pull/2018
This commit is contained in:
committed by
Angus Gratton
parent
2a6c35c9af
commit
5bc1bf4add
@ -250,6 +250,18 @@ class PartitionDefinition(object):
|
|||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
return self.offset - other.offset
|
return self.offset - other.offset
|
||||||
|
|
||||||
|
def __lt__(self, other):
|
||||||
|
return self.offset < other.offset
|
||||||
|
|
||||||
|
def __gt__(self, other):
|
||||||
|
return self.offset > other.offset
|
||||||
|
|
||||||
|
def __le__(self, other):
|
||||||
|
return self.offset <= other.offset
|
||||||
|
|
||||||
|
def __ge__(self, other):
|
||||||
|
return self.offset >= other.offset
|
||||||
|
|
||||||
def parse_type(self, strval):
|
def parse_type(self, strval):
|
||||||
if strval == "":
|
if strval == "":
|
||||||
raise InputError("Field 'type' can't be left empty.")
|
raise InputError("Field 'type' can't be left empty.")
|
||||||
|
Reference in New Issue
Block a user