diff hgext/zeroconf/Zeroconf.py @ 28421:6d72cc613fc4

zeroconf: replace has_key with in
author timeless <timeless@mozdev.org>
date Tue, 01 Mar 2016 10:22:10 +0000
parents d03b7800672c
children e2c6092ad422
line wrap: on
line diff
--- a/hgext/zeroconf/Zeroconf.py	Tue Mar 01 09:59:58 2016 +0000
+++ b/hgext/zeroconf/Zeroconf.py	Tue Mar 01 10:22:10 2016 +0000
@@ -1389,7 +1389,7 @@
         changed if needed to make it unique on the network."""
         self.checkService(info)
         self.services[info.name.lower()] = info
-        if self.servicetypes.has_key(info.type):
+        if info.type in self.servicetypes:
             self.servicetypes[info.type] += 1
         else:
             self.servicetypes[info.type] = 1
@@ -1678,5 +1678,3 @@
     r.unregisterService(info)
     print("   Unregister done.")
     r.close()
-
-# no-check-code