mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-10-19 21:10:30 -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):
|
def gh_cmdline(ver, data):
|
||||||
return [
|
safe = [
|
||||||
__appname__, ver, 'fmap', 'github', __appname__, data['username'],
|
__appname__, ver, 'fmap', 'github', __appname__, data['username'],
|
||||||
data['password']
|
|
||||||
]
|
]
|
||||||
|
return safe + [data['password']], safe + ['PASSWORD_REDACTED']
|
||||||
|
|
||||||
|
|
||||||
def sf_cmdline(ver, sdata):
|
def sf_cmdline(ver, sdata):
|
||||||
@ -151,8 +151,8 @@ def calibre_cmdline(ver):
|
|||||||
return [__appname__, ver, 'fmap', 'calibre']
|
return [__appname__, ver, 'fmap', 'calibre']
|
||||||
|
|
||||||
|
|
||||||
def run_remote_upload(args):
|
def run_remote_upload(args, safe=None):
|
||||||
print('Running remotely:', ' '.join(args))
|
print('Running remotely:', ' '.join(safe or args))
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
'ssh', '-x', f'{STAGING_USER}@{STAGING_HOST}', 'cd', STAGING_DIR, '&&',
|
'ssh', '-x', f'{STAGING_USER}@{STAGING_HOST}', 'cd', STAGING_DIR, '&&',
|
||||||
'python', 'hosting.py'
|
'python', 'hosting.py'
|
||||||
@ -298,10 +298,11 @@ class UploadInstallers(Command): # {{{
|
|||||||
|
|
||||||
def upload_to_github(self, replace):
|
def upload_to_github(self, replace):
|
||||||
data = get_github_data()
|
data = get_github_data()
|
||||||
args = gh_cmdline(__version__, data)
|
args, safe = gh_cmdline(__version__, data)
|
||||||
if replace:
|
if replace:
|
||||||
args = ['--replace'] + args
|
args = ['--replace'] + args
|
||||||
run_remote_upload(args)
|
safe = ['--replace'] + safe
|
||||||
|
run_remote_upload(args, safe)
|
||||||
|
|
||||||
def upload_to_sourceforge(self):
|
def upload_to_sourceforge(self):
|
||||||
sdata = get_sourceforge_data()
|
sdata = get_sourceforge_data()
|
||||||
|
@ -323,7 +323,7 @@ class Worker:
|
|||||||
s.settimeout(5)
|
s.settimeout(5)
|
||||||
try:
|
try:
|
||||||
if self.uses_ssl:
|
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))
|
s.connect(('localhost', self.port))
|
||||||
return
|
return
|
||||||
except OSError:
|
except OSError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user