[PATCH 7 of 8] zeroconf: del is not a function

timeless timeless at mozdev.org
Tue Mar 1 05:39:09 EST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1456825472 0
#      Tue Mar 01 09:44:32 2016 +0000
# Node ID 0d4be35adbb10c4eb8983ec1c3665bac09e9ef43
# Parent  7fcf5716848dc60f2b4a2f7cc3b29c67ee55fb49
zeroconf: del is not a function

diff --git a/hgext/zeroconf/Zeroconf.py b/hgext/zeroconf/Zeroconf.py
--- a/hgext/zeroconf/Zeroconf.py
+++ b/hgext/zeroconf/Zeroconf.py
@@ -915,7 +915,7 @@
 
     def delReader(self, socket):
         self.condition.acquire()
-        del(self.readers[socket])
+        del self.readers[socket]
         self.condition.notify()
         self.condition.release()
 
@@ -1011,7 +1011,7 @@
                 if not expired:
                     oldrecord.resetTTL(record)
                 else:
-                    del(self.services[record.alias.lower()])
+                    del self.services[record.alias.lower()]
                     callback = (lambda x:
                         self.listener.removeService(x, self.type, record.alias))
                     self.list.append(callback)
@@ -1380,7 +1380,7 @@
         for browser in self.browsers:
             if browser.listener == listener:
                 browser.cancel()
-                del(browser)
+                del browser
 
     def registerService(self, info, ttl=_DNS_TTL):
         """Registers service information to the network with a default TTL
@@ -1423,7 +1423,7 @@
     def unregisterService(self, info):
         """Unregister a service."""
         try:
-            del(self.services[info.name.lower()])
+            del self.services[info.name.lower()]
             if self.servicetypes[info.type] > 1:
                 self.servicetypes[info.type] -= 1
             else:


More information about the Mercurial-devel mailing list