Skip to content

Commit

Permalink
dict.has_key() has been deprecated in python3, as per the release d…
Browse files Browse the repository at this point in the history
…ocs:

https://docs.python.org/3.0/whatsnew/3.0.html#builtins

Changed `has_key()` to use python's `in` syntax.
  • Loading branch information
cronburg committed Jun 3, 2019
1 parent 4a5454f commit 6bb345e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avahi-python/avahi-discover/avahi-discover.py
Expand Up @@ -210,10 +210,10 @@ def browse_domain(self, interface, protocol, domain):
self.new_service_type(interface, protocol, self.stype, domain)

def new_domain(self,interface, protocol, domain, flags):
if self.zc_ifaces.has_key((interface,protocol)) == False:
if ((interface,protocol) in self.zc_ifaces) == False:
ifn = self.get_interface_name(interface, protocol)
self.zc_ifaces[(interface,protocol)] = self.insert_row(self.treemodel, None, ifn,None,interface,protocol,None,domain)
if self.zc_domains.has_key((interface,protocol,domain)) == False:
if ((interface,protocol,domain) in self.zc_domains) == False:
self.zc_domains[(interface,protocol,domain)] = self.insert_row(self.treemodel, self.zc_ifaces[(interface,protocol)], domain,None,interface,protocol,None,domain)
if domain != "local":
self.browse_domain(interface, protocol, domain)
Expand Down

0 comments on commit 6bb345e

Please sign in to comment.