Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
salt.10418
fix-index-error-when-running-on-python-3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-index-error-when-running-on-python-3.patch of Package salt.10418
From 763734f3e54951edf60924f50ca19276f1df60d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= <psuarezhernandez@suse.com> Date: Thu, 20 Sep 2018 11:51:58 +0100 Subject: [PATCH] Fix index error when running on Python 3 Fix wrong queryformat for zypper list_provides --- salt/modules/zypper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py index 3134506900..308033cf1d 100644 --- a/salt/modules/zypper.py +++ b/salt/modules/zypper.py @@ -2187,7 +2187,7 @@ def list_provides(**kwargs): ''' ret = __context__.get('pkg.list_provides') if not ret: - cmd = ['rpm', '-qa', '--queryformat', '[%{PROVIDES}_|-%{NAME}\n]'] + cmd = ['rpm', '-qa', '--queryformat', '%{PROVIDES}_|-%{NAME}\n'] ret = dict() for line in __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False).splitlines(): provide, realname = line.split('_|-') @@ -2252,7 +2252,7 @@ def resolve_capabilities(pkgs, refresh, **kwargs): try: result = search(name, provides=True, match='exact') if len(result) == 1: - name = result.keys()[0] + name = next(iter(result.keys())) elif len(result) > 1: log.warn("Found ambiguous match for capability '%s'.", pkg) except CommandExecutionError as exc: -- 2.17.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor