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

Andreas Tille tille at debian.org
Thu Oct 19 09:41:20 UTC 2017


The following commit has been merged in the master branch:
commit cb1f96381f37713c831fb56190326d2e200e2ef9
Author: Andreas Tille <tille at debian.org>
Date:   Thu Oct 19 07:49:53 2017 +0200

    Throw exception on genshi error

diff --git a/webtools/tasks.py b/webtools/tasks.py
index 8f457cb..684a44b 100755
--- a/webtools/tasks.py
+++ b/webtools/tasks.py
@@ -46,11 +46,16 @@ template_dir = os.path.join(current_dir, 'templates')
 # Initialize i18n
 domain = 'blends-webtools'
 gettext.install(domain)
-l10nstring = dict((lang['ddtp'],
-                   gettext.translation(domain, locale_dir,
-                                       languages=[lang['ddtp']],
-                                       fallback=True))
-                  for lang in languages)
+try:
+    l10nstring = dict((lang['ddtp'],
+                       gettext.translation(domain, locale_dir,
+                                           languages=[lang['ddtp']],
+                                           fallback=True))
+                      for lang in languages)
+    print(l10nstring)
+except UnicodeDecodeError as err:
+    print(err)
+    exit(-1)
 # Translated strings regarding the categorising of dependencies need to
 # be translated and because I did not found a working solution to get
 # gettext working with genshi all are collected here even if the additional

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list