From ac308fbd9cd0db59dab7138b75e0697a98b06429 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 15 Jul 2020 13:06:54 -0400 Subject: [PATCH] Fix python3 issues in ssdp code In the ssdp code, there were python3 specific issues. --- confluent_server/confluent/discovery/protocols/ssdp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/protocols/ssdp.py b/confluent_server/confluent/discovery/protocols/ssdp.py index 2a7cc264..841ce212 100644 --- a/confluent_server/confluent/discovery/protocols/ssdp.py +++ b/confluent_server/confluent/discovery/protocols/ssdp.py @@ -278,7 +278,7 @@ def _find_service(service, target): for url in peerdata[nid].get('urls', ()): if url.endswith('/desc.tmpl'): info = urlopen(url).read() - if 'Athena' in info: + if b'Athena' in info: peerdata[nid]['services'] = ['service:thinkagile-storage'] yield peerdata[nid] @@ -292,10 +292,10 @@ def _parse_ssdp(peer, rsp, peerdata): mac = nid headlines = rsp.split(b'\r\n') try: - _, code, _ = headlines[0].split(' ', 2) + _, code, _ = headlines[0].split(b' ', 2) except ValueError: return - if code == '200': + if code == b'200': if nid in peerdata: peerdatum = peerdata[nid] if peer not in peerdatum['addresses']: