# HG changeset patch # User Paul Boddie # Date 1318715567 -7200 # Node ID 71087b8512cfebf1827786e848c2b3ebd052c211 # Parent 6813feee7e682ad21b255690b2580a109c5a6918 Added calculated settings to the show_config method. diff -r 6813feee7e68 -r 71087b8512cf moinsetup.py --- a/moinsetup.py Sat Oct 15 22:36:26 2011 +0200 +++ b/moinsetup.py Sat Oct 15 23:52:47 2011 +0200 @@ -492,6 +492,12 @@ print "%-24s%s" % (setting, getattr(self, setting)) print + print "Configuration locations" + print "-----------------------" + print + print "%-24s%s" % ("site-level", self.get_site_config()) + print "%-24s%s" % ("global", self.get_global_config()) + def _get_abspath(self, d): return d and abspath(d) or None @@ -569,6 +575,24 @@ else: return self.common_dir + def get_site_config(self): + + "Return the file providing the site-level configuration." + + if self.site_config: + return self.site_config + else: + return join(self.common_dir, "wikiconfig.py") + + def get_global_config(self): + + "Return the file providing the global MoinMoin configuration." + + if self.farm_config: + return self.farm_config + else: + return join(self.common_dir, "wikiconfig.py") + def get_static_identifier(self): "Return the static URL/directory identifier for the Wiki." @@ -989,10 +1013,7 @@ will be changed. """ - if self.site_config: - wikiconfig_py = self.site_config - else: - wikiconfig_py = join(self.common_dir, "wikiconfig.py") + wikiconfig_py = self.get_site_config() status("Editing configuration from %s..." % wikiconfig_py) @@ -1019,10 +1040,7 @@ will be changed. """ - if self.farm_config: - wikiconfig_py = self.farm_config - else: - wikiconfig_py = join(self.common_dir, "wikiconfig.py") + wikiconfig_py = self.get_global_config() status("Editing configuration from %s..." % wikiconfig_py)