Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/hgwebdir_mod.py @ 9903:5d748045c2ae stable
Do not overwrite motd attribute of hgwebdir instances on refresh.
This allows using
application = hgwebdir(...)
application.motd = (string or object with __str__ method)
in WSGI (like it is possible in CGI).
Changed web.motd in the config file is still read with this, because
hgwebdir.templater.motd() does not store the config value.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 22 Nov 2009 11:25:01 +0100 |
parents | d3dbdca92458 |
children | 97c75ad3b1a0 25e572394f5c |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Thu Nov 19 11:06:01 2009 +0900 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Nov 22 11:25:01 2009 +0100 @@ -48,6 +48,7 @@ self.conf = conf self.baseui = baseui self.lastrefresh = 0 + self.motd = None self.refresh() def refresh(self): @@ -72,7 +73,6 @@ encoding.encoding = self.ui.config('web', 'encoding', encoding.encoding) - self.motd = self.ui.config('web', 'motd') self.style = self.ui.config('web', 'style', 'paper') self.stripecount = self.ui.config('web', 'stripes', 1) if self.stripecount: