diff options
-rw-r--r-- | src/engine/SCons/Action.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/packaging/msi.py | 2 | ||||
-rw-r--r-- | src/test_setup.py | 4 | ||||
-rw-r--r-- | test/fixture/mycompile.py | 6 | ||||
-rw-r--r-- | test/fixture/myrewrite.py | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index f97d564..fd859ad 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -785,7 +785,7 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw): kw[stream] = DEVNULL else: if sys.platform == 'win32': - kw[stream] = msvcrt.get_osfhandle(open(os.devnull, "r+")) + kw[stream] = msvcrt.get_osfhandle(os.open(os.devnull, os.O_RDWR)) else: kw[stream] = open(os.devnull, "r+") diff --git a/src/engine/SCons/Tool/packaging/msi.py b/src/engine/SCons/Tool/packaging/msi.py index 3a394a0..0ef18ec 100644 --- a/src/engine/SCons/Tool/packaging/msi.py +++ b/src/engine/SCons/Tool/packaging/msi.py @@ -447,7 +447,7 @@ def build_license_file(directory, spec): if text!='': f.write(text.replace('\n', '\\par ')) else: - file.write(name+'\\par\\par') + f.write(name+'\\par\\par') f.write('}') # diff --git a/src/test_setup.py b/src/test_setup.py index 75e0533..09865f5 100644 --- a/src/test_setup.py +++ b/src/test_setup.py @@ -178,8 +178,8 @@ zip = os.path.join(cwd, 'build', 'dist', '%s.zip' % scons_version) if os.path.isfile(zip): try: import zipfile - except - ImportError: pass + except ImportError: + pass else: with zipfile.ZipFile(zip, 'r') as zf: diff --git a/test/fixture/mycompile.py b/test/fixture/mycompile.py index 275f7be..27bf840 100644 --- a/test/fixture/mycompile.py +++ b/test/fixture/mycompile.py @@ -13,7 +13,7 @@ if __name__ == '__main__': with open(sys.argv[2], 'wb') as ofp: for f in sys.argv[3:]: with open(f, 'rb') as ifp: - lines = [l for l in ifp.readlines() if l != line] - for l in lines: - ofp.write(l) + lines = [ln for ln in ifp.readlines() if ln != line] + for ln in lines: + ofp.write(ln) sys.exit(0) diff --git a/test/fixture/myrewrite.py b/test/fixture/myrewrite.py index 95272b6..ad46091 100644 --- a/test/fixture/myrewrite.py +++ b/test/fixture/myrewrite.py @@ -10,8 +10,8 @@ import sys if __name__ == '__main__': line = ('/*' + sys.argv[1] + '*/\n').encode() with open(sys.argv[2], 'rb') as ifp: - lines = [l for l in ifp.readlines() if l != line] + lines = [ln for ln in ifp.readlines() if ln != line] with open(sys.argv[2], 'wb') as ofp: - for l in lines: - ofp.write(l) + for ln in lines: + ofp.write(ln) sys.exit(0) |