From 6c6932c374d5be7de6b69d50ae40a09f423218b0 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sat, 9 Nov 2013 17:22:37 +0100 Subject: [PATCH] avahi: Only convert single string at a time in helper --- mopidy/utils/zeroconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/utils/zeroconf.py b/mopidy/utils/zeroconf.py index 62545e27..8af63777 100644 --- a/mopidy/utils/zeroconf.py +++ b/mopidy/utils/zeroconf.py @@ -24,7 +24,7 @@ def _filter_loopback_and_meta_addresses(host): def _convert_text_to_dbus_bytes(text): - return [[dbus.Byte(ord(c)) for c in s] for s in text] + return [dbus.Byte(ord(c)) for c in text] class Zeroconf: @@ -62,7 +62,7 @@ class Zeroconf: bus.get_object("org.freedesktop.Avahi", server.EntryGroupNew()), "org.freedesktop.Avahi.EntryGroup") - text = _convert_text_to_dbus_bytes(self.text) + text = [_convert_text_to_dbus_bytes(t) for t in self.text] self.group.AddService(_AVAHI_IF_UNSPEC, _AVAHI_PROTO_UNSPEC, dbus.UInt32(_AVAHI_PUBLISHFLAGS_NONE), self.name, self.stype, self.domain, self.host,