[Mpuls-commits] r6095 - base/trunk/mpulsweb/lib

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 5 09:52:50 CEST 2012


Author: torsten
Date: 2012-10-05 09:52:50 +0200 (Fri, 05 Oct 2012)
New Revision: 6095

Modified:
   base/trunk/mpulsweb/lib/config.py
Log:
Make application name configurable


Modified: base/trunk/mpulsweb/lib/config.py
===================================================================
--- base/trunk/mpulsweb/lib/config.py	2012-10-04 13:58:19 UTC (rev 6094)
+++ base/trunk/mpulsweb/lib/config.py	2012-10-05 07:52:50 UTC (rev 6095)
@@ -118,7 +118,7 @@
                 sections[section_key] = section
             section[item_key] = item
 
-        set('common', 'name', 'mpuls')
+        set('common', 'name', 'DISTRIBUTION')
         set('common', 'version', 'rev. %s' % get_revision())
         set('common', 'releasedate', 'RELEASEDATE')
         set('common', 'showdemonotice', '0')
@@ -484,7 +484,12 @@
             return None
 
     def get_app_name(self):
-        return self.get('common', 'name')
+        name = self.get('common', 'name')
+        # DISTRIBUTION is replaced with the applicatio name. If not, then
+        # return default string.
+        if name == "DISTRIBUTION":
+            return "mpuls"
+        return name
 
     def get_app_version(self):
         return self.get('common', 'version')



More information about the Mpuls-commits mailing list