# HG changeset patch # User Michael Gebetsroither # Date 2007-01-30 21:07:22 # Node ID 02205626335411d964f52dda2dd9675e776f50cf # Parent 75313c36aa04d1dde95e160ee5471c6d4a9909c7 hgwebdir: class hgwebdir should also accept a configparser instance diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -29,8 +29,11 @@ class hgwebdir(object): self.repos = cleannames(config.items()) self.repos.sort() else: - cp = util.configparser() - cp.read(config) + if isinstance(config, util.configparser): + cp = config + else: + cp = util.configparser() + cp.read(config) self.repos = [] if cp.has_section('web'): if cp.has_option('web', 'motd'):