[Python-checkins] bpo-32155: Bugfixes found by flake8 F841 warnings (#4619)
Victor Stinner
webhook-mailer at python.org
Tue Nov 28 17:04:15 EST 2017
https://github.com/python/cpython/commit/6979fcdc91114b1ccb16345e26734d6df4cccbc3
commit: 6979fcdc91114b1ccb16345e26734d6df4cccbc3
branch: 3.6
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-11-28T23:04:12+01:00
summary:
bpo-32155: Bugfixes found by flake8 F841 warnings (#4619)
* turtledemo: wait until macOS osascript command completes to not
create a zombie process
* Tools/scripts/treesync.py: declare 'default_answer' and
'create_files' as globals to modify them with the command line
arguments. Previously, -y, -n, -f and -a options had no effect.
flake8 warning: "F841 local variable 'p' is assigned to but never
used".
files:
M Lib/turtledemo/__main__.py
M Tools/scripts/treesync.py
diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py
index 0a58332a666..6daf694427d 100644
--- a/Lib/turtledemo/__main__.py
+++ b/Lib/turtledemo/__main__.py
@@ -136,7 +136,7 @@ def __init__(self, filename=None):
import subprocess
# Make sure we are the currently activated OS X application
# so that our menu bar appears.
- p = subprocess.Popen(
+ subprocess.run(
[
'osascript',
'-e', 'tell application "System Events"',
diff --git a/Tools/scripts/treesync.py b/Tools/scripts/treesync.py
index 652d3940a49..215e2bd4e54 100755
--- a/Tools/scripts/treesync.py
+++ b/Tools/scripts/treesync.py
@@ -33,7 +33,7 @@
write_master = "ask"
def main():
- global always_no, always_yes
+ global default_answer, always_no, always_yes, create_files
global create_directories, write_master, write_slave
opts, args = getopt.getopt(sys.argv[1:], "nym:s:d:f:a:")
for o, a in opts:
More information about the Python-checkins
mailing list