bpo-32155: Bugfixes found by flake8 F841 warnings (#4608)
* distutils.config: Use the PyPIRCCommand.realm attribute if set * 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".
This commit is contained in:
parent
4271dfd781
commit
696b501cd1
|
@ -77,7 +77,7 @@ class PyPIRCCommand(Command):
|
|||
# optional params
|
||||
for key, default in (('repository',
|
||||
self.DEFAULT_REPOSITORY),
|
||||
('realm', self.DEFAULT_REALM),
|
||||
('realm', realm),
|
||||
('password', None)):
|
||||
if config.has_option(server, key):
|
||||
current[key] = config.get(server, key)
|
||||
|
@ -106,7 +106,7 @@ class PyPIRCCommand(Command):
|
|||
'password': config.get(server, 'password'),
|
||||
'repository': repository,
|
||||
'server': server,
|
||||
'realm': self.DEFAULT_REALM}
|
||||
'realm': realm}
|
||||
|
||||
return {}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ class DemoWindow(object):
|
|||
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"',
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix distutils.config: use the PyPIRCCommand.realm attribute if it is set.
|
|
@ -33,7 +33,7 @@ write_slave = "ask"
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue