From: Jelmer Vernooij Date: Mon, 2 Jun 2014 00:53:01 +0000 (+0200) Subject: Fix more pep8 issues in code I touched recently. X-Git-Tag: samba-4.2.0rc5~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac06d67a7208e4e9b30d5225de691c6902e7b0d6;p=thirdparty%2Fsamba.git Fix more pep8 issues in code I touched recently. Signed-Off-By: Jelmer Vernooij Reviewed-by: Andrew Bartlett Change-Id: I35f3204bdf5d00b3280d703427ded2fa2163a6f7 (similar to commit 0c2408531709eb720a2e96f72afbc2ecbfe6b06d) This only backports the buildtools/wafsamba/ changes --- diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py index 571954de169..ffe678416ed 100644 --- a/buildtools/wafsamba/samba3.py +++ b/buildtools/wafsamba/samba3.py @@ -6,16 +6,17 @@ from optparse import SUPPRESS_HELP from samba_utils import os_path_relpath, TO_LIST from samba_autoconf import library_flags + def SAMBA3_ADD_OPTION(opt, option, help=(), dest=None, default=True, with_name="with", without_name="without"): if default is None: - default_str="auto" + default_str = "auto" elif default is True: - default_str="yes" + default_str = "yes" elif default is False: - default_str="no" + default_str = "no" else: - default_str=str(default) + default_str = str(default) if help == (): help = ("Build with %s support (default=%s)" % (option, default_str)) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 128dff386eb..30fbf13da6c 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -730,7 +730,8 @@ 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"] is 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)