Remove last instances of pep8 error E712 (use 'is' rather than '==' for booleans)
authorJelmer Vernooij <jelmer@samba.org>
Mon, 2 Jun 2014 00:36:13 +0000 (02:36 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Oct 2014 04:44:06 +0000 (06:44 +0200)
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: I43b394a6225b4c2049d979fda75548c82d781f67

buildtools/wafsamba/samba3.py
buildtools/wafsamba/wafsamba.py
source4/scripting/bin/samba_upgradeprovision

index 64cd8c7453c754648feacba85046a2a6293dd91c..571954de169fa80b5a4755bf513dbe5fcb72c01d 100644 (file)
@@ -10,9 +10,9 @@ def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True,
                       with_name="with", without_name="without"):
     if default is None:
         default_str="auto"
-    elif default == True:
+    elif default is True:
         default_str="yes"
-    elif default == False:
+    elif default is False:
         default_str="no"
     else:
         default_str=str(default)
index f86ac61d8a8c290d1158daa21c2c0efbfdbffac2..b36b47bbcb40f13db7e25705de125aab98004d73 100644 (file)
@@ -349,10 +349,10 @@ def SAMBA_BINARY(bld, binname, source,
     # only specify PIE flags for binaries
     pie_cflags = cflags
     pie_ldflags = TO_LIST(ldflags)
-    if bld.env['ENABLE_PIE'] == True:
+    if bld.env['ENABLE_PIE'] is True:
         pie_cflags += ' -fPIE'
         pie_ldflags.extend(TO_LIST('-pie'))
-    if bld.env['ENABLE_RELRO'] == True:
+    if bld.env['ENABLE_RELRO'] is True:
         pie_ldflags.extend(TO_LIST('-Wl,-z,relro,-z,now'))
 
     # first create a target for building the object files for this binary
@@ -726,7 +726,7 @@ sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"])
     lineno = 0
     for line in source_file:
         newline = line
-        if lineno == 0 and task.env["PYTHON_SPECIFIED"] == True and line[:2] == "#!":
+        if lineno == 0 and task.env["PYTHON_SPECIFIED"] is True and line[:2] == "#!":
             newline = replacement_shebang
         elif pattern in line:
             newline = line.replace(pattern, replacement)
index c4a0f793298e8f310651eb993a6593fa27733d7d..1893d03eea4fe8ebe71235a8b34be6f92a82927e 100755 (executable)
@@ -1786,7 +1786,7 @@ if __name__ == '__main__':
         # as we are assured that on this DNs we will have differences !
         # Also the check must be done in a clever way as for the moment we just
         # compare SDDL
-        if dnNotToRecalculateFound == False and (opts.debugchangesd or opts.debugall):
+        if dnNotToRecalculateFound is False and (opts.debugchangesd or opts.debugall):
             message(CHANGESD, "Checking recalculated SDs")
             check_updated_sd(new_ldbs.sam, ldbs.sam, names)