don't str() translated device status; fixes #108

This commit is contained in:
Daniel Pavel 2013-08-08 17:26:29 +02:00
parent 9c67b1b494
commit c0874220d2
1 changed files with 8 additions and 2 deletions

View File

@ -112,8 +112,14 @@ try:
if n is None:
n = _notifications[summary] = Notify.Notification()
message = reason or (_("unpaired") if dev.status is None else
(str(dev.status) or (_("connected") if dev.status else _("offline"))))
if reason:
message = reason
elif dev.status is None:
message = _("unpaired")
elif bool(dev.status):
message = dev.status.__str__() or _("connected")
else:
message = _("offline")
# we need to use the filename here because the notifications daemon
# is an external application that does not know about our icon sets