summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2021-03-05 18:51:56 +0530
committerdheerajd-msys <dheeraj.dubey@msystechnologies.com>2021-03-05 18:51:56 +0530
commitd70c0d8e136ebf869794400ee31f84ced3c2a933 (patch)
treeee44dc7e603f68abea2489e2177520003eedd686
parent392785b4bc21c22a1ccbc44e00fe3ef924166f18 (diff)
downloadchef-d70c0d8e136ebf869794400ee31f84ced3c2a933.tar.gz
DNF package: fix abrt errors
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
-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: