summaryrefslogtreecommitdiffstats
path: root/py3status/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'py3status/__init__.py')
-rwxr-xr-xpy3status/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py
index d1bc025..34e1934 100755
--- a/py3status/__init__.py
+++ b/py3status/__init__.py
@@ -152,6 +152,11 @@ class I3status(Thread):
for item in json_list:
if item['name'] in ['time', 'tztime']:
i3status_time = item['full_text'].encode('UTF-8', 'replace')
+ try:
+ # python3 compatibility code
+ i3status_time = i3status_time.decode()
+ except:
+ pass
# add mendatory items in i3status time format wrt issue #18
for fmt in ['%Y', '%m', '%d']:
if not fmt in time_format: