[PATCH 2 of 4] zeroconf: compare singleton using is

timeless timeless at mozdev.org
Tue Mar 8 23:23:59 EST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1456826398 0
#      Tue Mar 01 09:59:58 2016 +0000
# Node ID 4c53a5e481d5c7a7a02e0037dfcbfa2c3790eb35
# Parent  c80a02c9855bc1335cd817ab4aef72ec48128de7
zeroconf: compare singleton using is

diff --git a/hgext/zeroconf/Zeroconf.py b/hgext/zeroconf/Zeroconf.py
--- a/hgext/zeroconf/Zeroconf.py
+++ b/hgext/zeroconf/Zeroconf.py
@@ -1145,7 +1145,7 @@
                         value = 0
 
                 # Only update non-existent properties
-                if key and result.get(key) == None:
+                if key and result.get(key) is None:
                     result[key] = value
 
             self.properties = result


More information about the Mercurial-devel mailing list