Patchwork [2,of,4] zeroconf: compare singleton using is

login
register
mail settings
Submitter timeless@mozdev.org
Date March 9, 2016, 4:23 a.m.
Message ID <4c53a5e481d5c7a7a02e.1457497439@waste.org>
Download mbox | patch
Permalink /patch/13702/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 9, 2016, 4:23 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456826398 0
#      Tue Mar 01 09:59:58 2016 +0000
# Node ID 4c53a5e481d5c7a7a02e0037dfcbfa2c3790eb35
# Parent  c80a02c9855bc1335cd817ab4aef72ec48128de7
zeroconf: compare singleton using is

Patch

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