added new test to check is locale defined

This commit is contained in:
4shadoww 2018-05-31 14:12:39 +03:00
parent 290f95d6b4
commit 403b5ddd13

View file

@ -32,7 +32,7 @@ class Module(bumblebee.engine.Module):
bumblebee.output.Widget(full_text=self.get_time))
self._fmt = self.parameter("format", default_format(self.name))
l = locale.getdefaultlocale()
if not l:
if not l or l == (None, None):
l = ('en_US', 'UTF-8')
lcl = self.parameter("locale", ".".join(l))
locale.setlocale(locale.LC_TIME, lcl.split("."))