changeset 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 8939900073a8
children ac73cd788853 58bdcab55bdc f5fa1b5863de
files mercurial/hgweb/hgwebdir_mod.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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: