PEP8: fix E714: test for object identity should be 'is not'
authorJoe Guo <joeg@catalyst.net.nz>
Mon, 30 Jul 2018 03:45:18 +0000 (15:45 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 24 Aug 2018 05:49:25 +0000 (07:49 +0200)
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/netcmd/domain.py
source4/torture/drs/python/repl_schema.py

index becbc498b9e8d752f03fd32b2891c86302c0f5a7..9bdd17e3bccd8ebc375db5e4b35cec38c2e19280 100644 (file)
@@ -622,7 +622,7 @@ class cmd_domain_dcpromo(Command):
 
         netbios_name = lp.get("netbios name")
 
-        if not role is None:
+        if role is not None:
             role = role.upper()
 
         if role == "DC":
@@ -697,7 +697,7 @@ class cmd_domain_join(Command):
 
         netbios_name = lp.get("netbios name")
 
-        if not role is None:
+        if role is not None:
             role = role.upper()
 
         if role is None or role == "MEMBER":
index 8c288e42d9254e103dc689e7246613652cb730db..ed3ad094fec25d47b92dd6bf779fcb2c72cda33e 100644 (file)
@@ -127,7 +127,7 @@ class DrsReplSchemaTestCase(drs_base.DrsBaseTestCase):
                "subClassOf": "top",
                "systemOnly": "FALSE"}
         # allow overriding/adding attributes
-        if not attrs is None:
+        if attrs is not None:
             rec.update(attrs)
         # add it to the Schema
         try:
@@ -153,7 +153,7 @@ class DrsReplSchemaTestCase(drs_base.DrsBaseTestCase):
                "isSingleValued": "TRUE",
                "systemOnly": "FALSE"}
         # allow overriding/adding attributes
-        if not attrs is None:
+        if attrs is not None:
             rec.update(attrs)
         # add it to the Schema
         ldb_ctx.add(rec)