b62ed1823c
When using the package-installs element there can be some encoding problems if the package installation emits unparsable output [1]. However in this case we just want to forward the output to the console which normally can handle this correctly. In order to fix this switch off universal_newlines processing such that we just operate on bytes. Further we have to decode the lines without setting the locale and ignoring errors. This is required because print encodes without setting the locale and thus we need to filter/modify the stream such that it doesn't crash. [1] Traceback: 2018-03-01 09:58:00.515 | Traceback (most recent call last): 2018-03-01 09:58:00.515 | File "/usr/local/bin/package-installs-v2", line 137, in <module> 2018-03-01 09:58:00.515 | main() 2018-03-01 09:58:00.515 | File "/usr/local/bin/package-installs-v2", line 130, in main 2018-03-01 09:58:00.515 | process_output(install_args, follow=True) 2018-03-01 09:58:00.515 | for line in iter(proc.stdout.readline, ''): 2018-03-01 09:58:00.515 | File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode 2018-03-01 09:58:00.515 | return codecs.ascii_decode(input, self.errors)[0] 2018-03-01 09:58:00.515 | UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 34: ordinal not in range(128) Change-Id: Ie4af9b4523459a630cfb98d09093bfe9ef7aa61e |
||
---|---|---|
.. | ||
package-installs | ||
package-installs-squash | ||
package-installs-v2 | ||
package-uninstalls |