X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fhoneycomb%2FHoneycombUtil.py;h=76bb5b38788a8e230d2c2cc3d181927d48776889;hb=b5fe0fd9a4266773125cc4d4c1edaa1c1a8a1731;hp=39c076d9c3d843722b4c2a79d64816986733a551;hpb=0513ce5642dcf58b21f9b77d6b50e4e9a7a94f04;p=csit.git diff --git a/resources/libraries/python/honeycomb/HoneycombUtil.py b/resources/libraries/python/honeycomb/HoneycombUtil.py index 39c076d9c3..76bb5b3878 100644 --- a/resources/libraries/python/honeycomb/HoneycombUtil.py +++ b/resources/libraries/python/honeycomb/HoneycombUtil.py @@ -302,7 +302,14 @@ class HoneycombUtil(object): base_path = HoneycombUtil.read_path_from_url_file(url_file) path = base_path + path status_code, resp = HTTPRequest.get(node, path) - return status_code, loads(resp) + + try: + data = loads(resp) + except ValueError: + logger.debug("Failed to deserialize JSON data.") + data = None + + return status_code, data @staticmethod def put_honeycomb_data(node, url_file, data, path="", @@ -448,10 +455,11 @@ class HoneycombUtil(object): if not perf: cmd = "cp /tmp/honeycomb.log /scratch/" - ssh.exec_command_sudo(cmd) + ssh.exec_command_sudo(cmd, timeout=60) else: ssh.scp( ".", "/tmp/honeycomb.log", - get=True) + get=True, + timeout=60) ssh.exec_command("rm /tmp/honeycomb.log")