X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fcommon.git;a=blobdiff_plain;f=osm_common%2Fdbmemory.py;fp=osm_common%2Fdbmemory.py;h=ad5213573f3d9f32db8bc9ef3f7e1a7eedbcef2b;hp=9f8c571e9ec5d6a6e45ab13fcf4113496e1cc308;hb=d3b582a7268d90c072bb7fbe10a25c80851f3c1e;hpb=15ec83a20391bf91618952247023716218292d72 diff --git a/osm_common/dbmemory.py b/osm_common/dbmemory.py index 9f8c571..ad52135 100644 --- a/osm_common/dbmemory.py +++ b/osm_common/dbmemory.py @@ -398,16 +398,18 @@ class DbMemory(DbBase): ) del dict_to_update[key_to_update] updated = True - except Exception: - pass + except Exception as unset_error: + self.logger.error(f"{unset_error} occured while updating DB.") if pull: for dot_k, v in pull.items(): try: dict_to_update, key_to_update, _ = _iterate_keys( dot_k, db_item, populate=False ) - except Exception: + except Exception as pull_error: + self.logger.error(f"{pull_error} occured while updating DB.") continue + if key_to_update not in dict_to_update: continue if not isinstance(dict_to_update[key_to_update], list): @@ -430,8 +432,12 @@ class DbMemory(DbBase): dict_to_update, key_to_update, _ = _iterate_keys( dot_k, db_item, populate=False ) - except Exception: + except Exception as iterate_error: + self.logger.error( + f"{iterate_error} occured while iterating keys in db update." + ) continue + if key_to_update not in dict_to_update: continue if not isinstance(dict_to_update[key_to_update], list):