Philipp Hörist pushed to branch master at gajim / gajim

Commits:
cb056712 by Philipp Hörist at 2018-11-21T20:44:19Z
Dont fail when importing plugin_i18n for tests

- - - - -


1 changed file:

- gajim/plugins/plugins_i18n.py


Changes:

=====================================
gajim/plugins/plugins_i18n.py
=====================================
@@ -21,7 +21,13 @@ import gettext
 from gajim.common import configpaths
 
 DOMAIN = 'gajim_plugins'
-plugin_user_dir = configpaths.get('PLUGINS_USER')
+try:
+    plugin_user_dir = configpaths.get('PLUGINS_USER')
+except KeyError:
+    # This allows to import the module for tests
+    print('No plugin translation path available')
+    plugin_user_dir = ''
+
 plugins_locale_dir = os.path.join(plugin_user_dir, 'locale')
 
 try:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/cb0567125476a4ec83131e5d21de2a0319dce77a

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/cb0567125476a4ec83131e5d21de2a0319dce77a
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to