fix(repo): fixed empty config case

This commit is contained in:
RhodeCode Admin 2023-12-28 15:25:35 +01:00
parent 45ebc7cca3
commit f58c9733d4

View file

@ -83,7 +83,7 @@ class MercurialRepository(BaseRepository):
# NOTE(marcink): since python3 hgsubversion is deprecated.
# From old installations we might still have this set enabled
# we explicitly remove this now here to make sure it wont propagate further
if config.get('extensions', 'hgsubversion') is not None:
if config and config.get('extensions', 'hgsubversion') is not None:
config.drop_option('extensions', 'hgsubversion')
self.with_wire = with_wire or {"cache": False} # default should not use cache