diff options
author | Thom May <thom@may.lt> | 2018-04-14 16:14:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-14 16:14:36 +0100 |
commit | 3770466481559b92f9200a92590a02cffaa6c594 (patch) | |
tree | 8e083c3401829a3b771f58c476520f44c1d51149 | |
parent | c408c44fe5a6eba8b3c74f7333acb0c55a43ebd9 (diff) | |
parent | d8dda18ce6558e688d2c37d379d53ba0e5b3b690 (diff) | |
download | chef-3770466481559b92f9200a92590a02cffaa6c594.tar.gz |
Merge pull request #7155 from tomdoherty/master
Catch json.load exceptions causing syslog errors
-rw-r--r-- | lib/chef/provider/package/yum/yum_helper.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/provider/package/yum/yum_helper.py b/lib/chef/provider/package/yum/yum_helper.py index 090b101316..3bb70e75fb 100644 --- a/lib/chef/provider/package/yum/yum_helper.py +++ b/lib/chef/provider/package/yum/yum_helper.py @@ -186,7 +186,13 @@ while 1: sys.exit(0) setup_exit_handler() line = inpipe.readline() - command = json.loads(line) + + try: + command = json.loads(line) + except ValueError, e: + base.closeRpmDB() + sys.exit(0) + if command['action'] == "whatinstalled": query(command) elif command['action'] == "whatavailable": |