Popen.communicate() returns a tuple (stdout, stderr), and stderr
will be of type bytes, hence the need to decode it before checking
if it's an empty string or not.
Fixes: a77b47eeeb5770eeefcf4619ab2105ee7a6a003e
Signed-off-by: Tim Serong <tserong@suse.com>
stderr=subprocess.PIPE,
)
f = open(os.path.join(path, 'meta'), 'rb')
- stderr = pr.communicate(input=f.read())
+ (_, stderr) = pr.communicate(input=f.read())
+ stderr = stderr.decode()
rc = pr.wait()
f.close()
if rc != 0 or stderr != "":