# HG changeset patch # User Michael Gebetsroither # Date 1170191242 -3600 # Node ID 02205626335411d964f52dda2dd9675e776f50cf # Parent 75313c36aa04d1dde95e160ee5471c6d4a9909c7 hgwebdir: class hgwebdir should also accept a configparser instance diff -r 75313c36aa04 -r 022056263354 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Tue Jan 30 11:40:17 2007 -0800 +++ b/mercurial/hgweb/hgwebdir_mod.py Tue Jan 30 22:07:22 2007 +0100 @@ -29,8 +29,11 @@ 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'):