diff --git a/proxy.py b/proxy.py index 5ce4679..5f0a776 100644 --- a/proxy.py +++ b/proxy.py @@ -143,7 +143,8 @@ class DynamicResolver(object): order.append(kv[0]) i += length - data = [b"%s=%s" % (p, info.properties[p]) for p in sorted(info.properties, key=lambda k: order.index(k) if k in order else 1000)] + data = [(b"%s=%s" % (p, v)) if (v := info.properties[p]) is not None else p + for p in sorted(info.properties, key=lambda k: order.index(k) if k in order else 1000)] now = current_time_millis() cached = self.zeroconf.cache.get_by_details(localname, _TYPE_TXT, _CLASS_IN) record_ttl = int(cached.get_remaining_ttl(now)) if cached else ttl