diff options
Diffstat (limited to 'avahi-utils')
-rw-r--r-- | avahi-utils/avahi/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/avahi-utils/avahi/__init__.py b/avahi-utils/avahi/__init__.py index 6a3a1cf..c10b85d 100644 --- a/avahi-utils/avahi/__init__.py +++ b/avahi-utils/avahi/__init__.py @@ -74,3 +74,11 @@ def string_array_to_txt_array(t): l.append(string_to_byte_array(s)) return l + +def dict_to_txt_array(txt_dict): + l = [] + + for k,v in txt_dict.items(): + l.append(string_to_byte_array("%s=%s" % (k,v))) + + return l |