From 5bc1bf4add7aedceebe3e1b50a2126bee8dc6d02 Mon Sep 17 00:00:00 2001 From: Marcin Jaworski Date: Thu, 31 May 2018 16:26:38 +0200 Subject: [PATCH] Fix PartitionDefinition comparison in Python 3 Merges https://github.com/espressif/esp-idf/pull/2018 --- components/partition_table/gen_esp32part.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/partition_table/gen_esp32part.py b/components/partition_table/gen_esp32part.py index 275976b741..0e3a0b7e95 100755 --- a/components/partition_table/gen_esp32part.py +++ b/components/partition_table/gen_esp32part.py @@ -250,6 +250,18 @@ class PartitionDefinition(object): def __cmp__(self, other): 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): if strval == "": raise InputError("Field 'type' can't be left empty.")