1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

Remove last instances of pep8 error E712 (use 'is' rather than '==' for booleans)

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: I43b394a6225b4c2049d979fda75548c82d781f67
This commit is contained in:
Jelmer Vernooij 2014-06-02 02:36:13 +02:00 committed by Andrew Bartlett
parent b605d152de
commit bd6faaf56a
3 changed files with 6 additions and 6 deletions

View 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)

View 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)

View File

@ -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)