[cwconfig] Trim down allowed exceptions in gettext language setting
I can't see any valid reason to pass on ImportError and AttributeError. In
particular, the latter shadowed a Python 3 error until 4f43e64603ef.
--- a/cubicweb/cwconfig.py Mon Nov 21 14:52:33 2016 +0100
+++ b/cubicweb/cwconfig.py Thu Nov 17 11:03:19 2016 +0100
@@ -1304,7 +1304,7 @@
try:
tr = translation('cubicweb', path, languages=[language])
self.translations[language] = (tr.ugettext, tr.upgettext)
- except (ImportError, AttributeError, IOError):
+ except IOError:
if self.mode != 'test':
# in test contexts, data/i18n does not exist, hence
# logging will only pollute the logs