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

Ole Streicher ole at aip.de
Tue Mar 15 12:55:58 UTC 2016


The following commit has been merged in the master branch:
commit ccc32dc3c2c97b6f587df42d4e96eef561ca93e7
Author: Ole Streicher <ole at aip.de>
Date:   Tue Mar 15 13:53:31 2016 +0100

    Prepare removal of blendsmarkdown.MarkupString:
    Remove try/except from MarkupString. It is a bug when a UnicodeError
    or a TypeError appears here: we want to see and fix this.

diff --git a/webtools/blendsmarkdown.py b/webtools/blendsmarkdown.py
index 20481f1..05622d1 100644
--- a/webtools/blendsmarkdown.py
+++ b/webtools/blendsmarkdown.py
@@ -103,22 +103,6 @@ def MarkupString(string, pkg, elem, lang='en'):
     # Genshi does not touch strings that are marked with "Markup()"
     # This function does the actual Markup call
     # for any string with error checking
-
-    if string is None:
-        return None
-    try:
-        string = Markup(string)
-    except UnicodeDecodeError as err:
-        stderr.write("----> %s UnicodeDecodeError in %s (lang='%s'): '%s'; Err: %s\n"
-                     % (elem, pkg, lang, 'debug-string', str(err)))
-        try:
-            string = Markup(unicode(string, 'utf-8'))
-        except TypeError as err:
-            stderr.write("====> %s TypeError in %s (lang='%s'): '%s'; Err: %s\n"
-                         % (elem, pkg, lang, 'debug-string', str(err)))
-    except TypeError as err:
-        stderr.write("----> %s TypeError in %s (lang='%s'): '%s'; Err: %s\n"
-                     % (elem, pkg, lang, 'debug-string', str(err)))
-    return string
+    return Markup(string) if string is not None else None
 
 rendering_lib = ''

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list