# HG changeset patch # User jfp <jf.pieronne@laposte.net> # Date 1715775641 -7200 # Wed May 15 14:20:41 2024 +0200 # Node ID 91c3454e812412de41b668f72f91f5989f64521d # Parent 8239bf464f948b33301f5334c286efaf05bfab4a Python3 fix diff --git a/python/local/ordb_module/ordb/Index.py b/python/local/ordb_module/ordb/Index.py --- a/python/local/ordb_module/ordb/Index.py +++ b/python/local/ordb_module/ordb/Index.py @@ -105,17 +105,17 @@ self._segment = {} self._load_segments(database, table) self._map = None - if database and database.caches().has_key(self.index_name): + if database and self.index_name in database.caches(): self._cache = database.cache(self.index_name) self._cache.set_cached_object(self) else: self._cache = None - if database and database.analyze_indexes().has_key(self.index_name): + if database and self.index_name in database.analyze_indexes(): self._analyze_index = database.analyze_index(self.index_name) self._analyze_index.set_index(self) else: self._analyze_index = None - if database and database.analyze_placements().has_key(self.index_name): + if database and self.index_name in database.analyze_placements(): self._analyze_placement = database.analyze_placement( self.index_name ) diff --git a/python/local/ordb_module/ordb/StorageMap.py b/python/local/ordb_module/ordb/StorageMap.py --- a/python/local/ordb_module/ordb/StorageMap.py +++ b/python/local/ordb_module/ordb/StorageMap.py @@ -42,24 +42,20 @@ else: self._area = area_name if self.index_id: - if database and database.analyze_logical_areas_by_id().has_key( - self.index_id - ): + if database and self.index_id in database.analyze_logical_areas_by_id(): self._partition_index_analyze = ( database.analyze_logical_area_by_id(self.index_id) ) else: self._partition_index_analyze = None - if database and database.analyze_logical_areas_by_id().has_key( - self.storage_id - ): + if database and self.storage_id in database.analyze_logical_areas_by_id(): self._system_record_analyze = ( database.analyze_logical_area_by_id(self.storage_id) ) else: self._system_record_analyze = None elif database: - if database.analyze_logical_areas_by_id().has_key(self.storage_id): + if self.storage_id in database.analyze_logical_areas_by_id(): self._partition_analyze = database.analyze_logical_area_by_id( self.storage_id )