Browse Source

Fix "not UTF-8 clean" sd_notify message

Thomas Dietrich 8 years ago
parent
commit
1247e98c8a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      miflora-mqtt-daemon.py

+ 1 - 1
miflora-mqtt-daemon.py

@@ -44,7 +44,7 @@ def print_line(text, error = False, warning=False, sd_notify=False, console=True
 
     timestamp_sd = strftime('%b %d %H:%M:%S', localtime())
     if sd_notify:
-        sd_notifier.notify('STATUS={} - {}.'.format(timestamp_sd, text))
+        sd_notifier.notify('STATUS={} - {}.'.format(timestamp_sd, unidecode(text)))
 
 
 # Eclipse Paho callbacks - http://www.eclipse.org/paho/clients/python/docs/#callbacks