stages/rpm: set encoding for subprocess.run()
Printing 'owner' in an fstring triggers the mypy warning 'str-bytes-safe'
Error: If x = b'abc' then f"{x}" or "{}".format(x) produces "b'abc'",
not "abc".
We can't yet use the nicer run() argument, 'text=True', because we still
target the RHEL 7 build root which only has Python 3.6 and 'text' was
introduced in Python 3.7.
This commit is contained in:
parent
8daf928b62
commit
7be822d6e9
1 changed files with 1 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ def remove_unowned_etc_kernel(tree, rpm_args):
|
|||
"--root", tree,
|
||||
"-qf", "/etc/kernel"],
|
||||
stdout=subprocess.PIPE,
|
||||
encoding="utf-8",
|
||||
check=False)
|
||||
owner = res.stdout.strip()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue