# HG changeset patch # User Stefano Rivera # Date 1359213275 -7200 # Node ID c91c613ae6d0c380dbab99d32b58fe2e6cb683b4 # Parent 1c8f8302e99029b3142d664761689ea044b92de7 The locale may be None, apparently diff -r 1c8f8302e990 -r c91c613ae6d0 pyntnclick/main.py --- a/pyntnclick/main.py Sat Jan 26 17:03:20 2013 +0200 +++ b/pyntnclick/main.py Sat Jan 26 17:14:35 2013 +0200 @@ -66,7 +66,7 @@ locale.setlocale(locale.LC_ALL, "") lang = locale.getlocale()[0] - if '_' in lang: + if lang and '_' in lang: lang = lang.split('_', 1)[0] self.resource = Resources(self._resource_module, lang) gettext.bindtextdomain(self.constants.i18n_name,