mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #35025 from dmacvicar/apt_crash
do not crash on "make" package description.
This commit is contained in:
commit
22a9237e1e
@ -288,9 +288,9 @@ def _get_pkg_info(*packages):
|
||||
if call['retcode']:
|
||||
raise CommandExecutionError("Error getting packages information: {0}".format(call['stderr']))
|
||||
|
||||
for pkg_info in [elm for elm in re.split(r"----*", call['stdout']) if elm.strip()]:
|
||||
for pkg_info in [elm for elm in re.split(r"------", call['stdout']) if elm.strip()]:
|
||||
pkg_data = {}
|
||||
pkg_info, pkg_descr = re.split(r"====*", pkg_info)
|
||||
pkg_info, pkg_descr = re.split(r"======", pkg_info)
|
||||
for pkg_info_line in [el.strip() for el in pkg_info.split(os.linesep) if el.strip()]:
|
||||
key, value = pkg_info_line.split(":", 1)
|
||||
if value:
|
||||
|
Loading…
Reference in New Issue
Block a user