summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2021-03-15 10:09:34 -0700
committerGitHub <noreply@github.com>2021-03-15 10:09:34 -0700
commit0cb85e062fefb80152e281a5a9f7ea3963c47501 (patch)
tree126872fbee6e832b4510f5287b01f889d3423b3d
parentf7616ee0a63087ca92fdfa10c7c5e1689d2c6713 (diff)
parentd70c0d8e136ebf869794400ee31f84ced3c2a933 (diff)
downloadchef-0cb85e062fefb80152e281a5a9f7ea3963c47501.tar.gz
Merge pull request #11144 from MsysTechnologiesllc/dheeraj/backport-pr-10991-to-chef15
[Backport to chef-15] DNF package: fix abrt errors
-rw-r--r--lib/chef/provider/package/dnf/dnf_helper.py5
-rw-r--r--lib/chef/provider/package/yum/yum_helper.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/provider/package/dnf/dnf_helper.py b/lib/chef/provider/package/dnf/dnf_helper.py
index 0859348212..f4109496c0 100644
--- a/lib/chef/provider/package/dnf/dnf_helper.py
+++ b/lib/chef/provider/package/dnf/dnf_helper.py
@@ -101,6 +101,11 @@ while 1:
if ppid == 1:
sys.exit(0)
line = sys.stdin.readline()
+
+ # only way to detect EOF in python
+ if line == "":
+ break
+
command = json.loads(line)
if command['action'] == "whatinstalled":
query(command)
diff --git a/lib/chef/provider/package/yum/yum_helper.py b/lib/chef/provider/package/yum/yum_helper.py
index 47cbe2efe6..465dceab18 100644
--- a/lib/chef/provider/package/yum/yum_helper.py
+++ b/lib/chef/provider/package/yum/yum_helper.py
@@ -196,6 +196,10 @@ try:
setup_exit_handler()
line = inpipe.readline()
+ # only way to detect EOF in python
+ if line == "":
+ break
+
try:
command = json.loads(line)
except ValueError, e: