Make CodeQL happy

Dont output github token to stdout during build
This commit is contained in:
Kovid Goyal 2025-09-15 14:47:46 +05:30
parent 4252c0c1cc
commit cb3ae447dc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 7 deletions

View File

@ -135,10 +135,10 @@ def send_to_backup(loc):
def gh_cmdline(ver, data):
return [
safe = [
__appname__, ver, 'fmap', 'github', __appname__, data['username'],
data['password']
]
return safe + [data['password']], safe + ['PASSWORD_REDACTED']
def sf_cmdline(ver, sdata):
@ -151,8 +151,8 @@ def calibre_cmdline(ver):
return [__appname__, ver, 'fmap', 'calibre']
def run_remote_upload(args):
print('Running remotely:', ' '.join(args))
def run_remote_upload(args, safe=None):
print('Running remotely:', ' '.join(safe or args))
subprocess.check_call([
'ssh', '-x', f'{STAGING_USER}@{STAGING_HOST}', 'cd', STAGING_DIR, '&&',
'python', 'hosting.py'
@ -298,10 +298,11 @@ class UploadInstallers(Command): # {{{
def upload_to_github(self, replace):
data = get_github_data()
args = gh_cmdline(__version__, data)
args, safe = gh_cmdline(__version__, data)
if replace:
args = ['--replace'] + args
run_remote_upload(args)
safe = ['--replace'] + safe
run_remote_upload(args, safe)
def upload_to_sourceforge(self):
sdata = get_sourceforge_data()

View File

@ -323,7 +323,7 @@ class Worker:
s.settimeout(5)
try:
if self.uses_ssl:
s = ssl.create_default_context().wrap_socket(s)
s = ssl._create_stdlib_context().wrap_socket(s)
s.connect(('localhost', self.port))
return
except OSError: