mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Ignore encoding errors in logs
Found while compiling io.privatestorage.privatestoragemobile_9:
Traceback (most recent call last):
File "/home/fdroid/fdroidserver/fdroidserver/build.py", line 1053, in main
if trybuild(app, build, build_dir, output_dir, log_dir,
File "/home/fdroid/fdroidserver/fdroidserver/build.py", line 813, in trybuild
build_server(app, build, vcs, build_dir, output_dir, log_dir, force)
File "/home/fdroid/fdroidserver/fdroidserver/build.py", line 253, in build_server
logging.debug("buildserver > " + str(line, 'utf-8').rstrip())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfa in position 8: invalid start byte
This commit is contained in:
parent
047819d34f
commit
49c415424d
1 changed files with 4 additions and 4 deletions
|
|
@ -250,13 +250,13 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
line = cmd_stdout.readline()
|
line = cmd_stdout.readline()
|
||||||
if line:
|
if line:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
logging.debug("buildserver > " + str(line, 'utf-8').rstrip())
|
logging.debug("buildserver > " + str(line, 'utf-8', 'replace').rstrip())
|
||||||
output += line
|
output += line
|
||||||
else:
|
else:
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
for line in cmd_stdout.readlines():
|
for line in cmd_stdout.readlines():
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
logging.debug("buildserver > " + str(line, 'utf-8').rstrip())
|
logging.debug("buildserver > " + str(line, 'utf-8', 'replace').rstrip())
|
||||||
output += line
|
output += line
|
||||||
finally:
|
finally:
|
||||||
cmd_stdout.close()
|
cmd_stdout.close()
|
||||||
|
|
@ -270,7 +270,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
else:
|
else:
|
||||||
message = "Build.py failed on server for {0}:{1}"
|
message = "Build.py failed on server for {0}:{1}"
|
||||||
raise BuildException(message.format(app.id, build.versionName),
|
raise BuildException(message.format(app.id, build.versionName),
|
||||||
str(output, 'utf-8'))
|
str(output, 'utf-8', 'replace'))
|
||||||
|
|
||||||
# Retreive logs...
|
# Retreive logs...
|
||||||
toolsversion_log = common.get_toolsversion_logname(app, build)
|
toolsversion_log = common.get_toolsversion_logname(app, build)
|
||||||
|
|
@ -296,7 +296,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise BuildException(
|
raise BuildException(
|
||||||
"Build failed for {0}:{1} - missing output files".format(
|
"Build failed for {0}:{1} - missing output files".format(
|
||||||
app.id, build.versionName), str(output, 'utf-8')) from exc
|
app.id, build.versionName), str(output, 'utf-8', 'replace')) from exc
|
||||||
ftp.close()
|
ftp.close()
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue