[Blends-commit] [SCM] website branch, master, updated. 2564a6c6d99a2b67fdedfbcb299995af72d015bc

Andreas Tille tille at debian.org
Wed Jul 10 14:00:09 UTC 2013


The following commit has been merged in the master branch:
commit 2564a6c6d99a2b67fdedfbcb299995af72d015bc
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jul 10 16:03:06 2013 +0200

    Cope with Blends that do not have some "advertising"

diff --git a/webtools/thermometer.py b/webtools/thermometer.py
index 3ecaed9..3ebe2ee 100755
--- a/webtools/thermometer.py
+++ b/webtools/thermometer.py
@@ -299,13 +299,15 @@ def main():
     data={}
     data['projectname'] = blendname
     data['blend_data']  = blend_data
-    if config.has_key('advertising'):
+    if config.has_key('advertising') and config['advertising'] != None:
         # we have to remove the gettext _() call which was inserted into the config
         # file to enable easy input for config file editors - but the call has to
         # be made explicitely in the python code
         advertising = re.sub('_\(\W(.+)\W\)', '\\1', config['advertising'])
         # gettext needs to escape '"' thus we need to remove the escape character '\'
         data['projectadvertising'] = Markup(to_unicode(re.sub('\\\\"', '"', advertising)))
+    else:
+        data['projectadvertising'] = None
 
     legend = [
                ['upToDate',        'Up to date'],

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list