summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip HubĂ­k <fhubik@redhat.com>2016-10-05 11:06:05 +0200
committerToshio Kuratomi <a.badger@gmail.com>2016-10-19 11:02:27 -0700
commit2d459b797f954ea9239e49bb0360f29be91eb3d3 (patch)
treee2064d7f88e019ee2171ffe727054c3e637432fe
parent53e452e88b1c920d0c941fec604f3c684d67b588 (diff)
downloadansible-modules-core-2d459b797f954ea9239e49bb0360f29be91eb3d3.tar.gz
Fix incorrect line wrapping in output from yum check-updates
https://github.com/ansible/ansible-modules-core/issues/4318#issuecomment-251416661
-rw-r--r--packaging/os/yum.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/packaging/os/yum.py b/packaging/os/yum.py
index 7602b248..131144d8 100644
--- a/packaging/os/yum.py
+++ b/packaging/os/yum.py
@@ -800,6 +800,8 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
res['results'].append('Nothing to do here, all packages are up to date')
return res
elif rc == 100:
+ # remove incorrect new lines in longer columns in output from yum check-update
+ out=re.sub('\n\W+', ' ', out)
available_updates = out.split('\n')
# build update dictionary
for line in available_updates: