Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/packages/zypper.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def subprocess_call(cmd, stdout=None, stderr=None):
process = subprocess_Popen(cmd, stdout, stderr)
outs, errs = process.communicate()
if stderr == subprocess.PIPE:
lines = [line for line in errs.decode("utf-8").splitlines()]
lines = [line for line in errs.decode().splitlines()]
if len(lines):
printed_error = "ErrorMessage=" + " ".join(lines)
sys.stdout.write(printed_error)
Expand Down Expand Up @@ -160,7 +160,7 @@ def list_updates(online):

process = subprocess_Popen([zypper_cmd] + zypper_options + online_flag + ["list-updates"], stdout=subprocess.PIPE)

for line in process.stdout:
for line in (line.decode() for line in process.stdout):

# Zypper's output looks like:
#
Expand Down Expand Up @@ -201,7 +201,7 @@ def one_package_argument(name, arch, version, is_zypper_install):
if is_zypper_install:
process = subprocess_Popen([rpm_cmd, "--qf", "%{arch}\n",
"-q", name], stdout=subprocess.PIPE)
existing_archs = [line.rstrip() for line in process.stdout]
existing_archs = [line.decode().rstrip() for line in process.stdout]
process.wait()
if process.returncode == 0 and existing_archs:
exists = True
Expand Down