# HG changeset patch # User Aurelien Campeas # Date 1339086833 -7200 # Node ID 150191e45ee5e783d94361d35638ecbcf3520da7 # Parent 5064b6e0d6f4ed4188adcee2a10f196119c99a5e [cwconfig] shutup on absent i18n/ mo files when in operating in tests diff -r 5064b6e0d6f4 -r 150191e45ee5 cwconfig.py --- a/cwconfig.py Thu Jun 07 18:24:37 2012 +0200 +++ b/cwconfig.py Thu Jun 07 18:33:53 2012 +0200 @@ -1152,8 +1152,11 @@ tr = translation('cubicweb', path, languages=[language]) self.translations[language] = (tr.ugettext, tr.upgettext) except (ImportError, AttributeError, IOError): - self.exception('localisation support error for language %s', - language) + if self.mode != 'test': + # in test contexts, data/i18n does not exist, hence + # logging will only pollute the logs + self.exception('localisation support error for language %s', + language) def vregistry_path(self): """return a list of files or directories where the registry will look