mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-10-17 12:00:38 -04:00
Make CodeQL happy
Dont output github token to stdout during build
This commit is contained in:
parent
4252c0c1cc
commit
cb3ae447dc
@ -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()
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user