mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
build: Rename chan to ssh_channel
This commit is contained in:
parent
45af14f9a0
commit
5e08187567
1 changed files with 6 additions and 6 deletions
|
|
@ -223,8 +223,8 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
|
|
||||||
# Execute the build script...
|
# Execute the build script...
|
||||||
logging.info("Starting build...")
|
logging.info("Starting build...")
|
||||||
chan = sshs.get_transport().open_session()
|
ssh_channel = sshs.get_transport().open_session()
|
||||||
chan.get_pty()
|
ssh_channel.get_pty()
|
||||||
cmdline = posixpath.join(homedir, 'fdroidserver', 'fdroid')
|
cmdline = posixpath.join(homedir, 'fdroidserver', 'fdroid')
|
||||||
cmdline += ' build --on-server'
|
cmdline += ' build --on-server'
|
||||||
if force:
|
if force:
|
||||||
|
|
@ -238,14 +238,14 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
if (options.scan_binary or config.get('scan_binary')) and not options.skipscan:
|
if (options.scan_binary or config.get('scan_binary')) and not options.skipscan:
|
||||||
cmdline += ' --scan-binary'
|
cmdline += ' --scan-binary'
|
||||||
cmdline += " %s:%s" % (app.id, build.versionCode)
|
cmdline += " %s:%s" % (app.id, build.versionCode)
|
||||||
chan.exec_command('bash --login -c "' + cmdline + '"') # nosec B601 inputs are sanitized
|
ssh_channel.exec_command('bash --login -c "' + cmdline + '"') # nosec B601 inputs are sanitized
|
||||||
|
|
||||||
# Fetch build process output ...
|
# Fetch build process output ...
|
||||||
try:
|
try:
|
||||||
cmd_stdout = chan.makefile('rb', 1024)
|
cmd_stdout = ssh_channel.makefile('rb', 1024)
|
||||||
output = bytes()
|
output = bytes()
|
||||||
output += common.get_android_tools_version_log().encode()
|
output += common.get_android_tools_version_log().encode()
|
||||||
while not chan.exit_status_ready():
|
while not ssh_channel.exit_status_ready():
|
||||||
line = cmd_stdout.readline()
|
line = cmd_stdout.readline()
|
||||||
if line:
|
if line:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
|
|
@ -262,7 +262,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
|
|
||||||
# Check build process exit status ...
|
# Check build process exit status ...
|
||||||
logging.info("...getting exit status")
|
logging.info("...getting exit status")
|
||||||
returncode = chan.recv_exit_status()
|
returncode = ssh_channel.recv_exit_status()
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
if timeout_event.is_set():
|
if timeout_event.is_set():
|
||||||
message = "Timeout exceeded! Build VM force-stopped for {0}:{1}"
|
message = "Timeout exceeded! Build VM force-stopped for {0}:{1}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue