When pod is not exist in DB, exception will be shown as
'Error pushing results into Database '<type 'exceptions.TypeError'>'',
very unclear, make it very difficult to fix the problem.
Modify it to show as the testapi returned
'HTTPError: HTTP 404: Not Found (Could not find pod [zte-no])'
JIRA: FUNCTEST-424
Change-Id: I55fc4639d745b84f6d32a148bd13793d236e2a09
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
logger.debug(r)
r.raise_for_status()
return True
+ except requests.RequestException:
+ if logger:
+ logger.error("Pushing Result to DB(%s) failed: %s" %
+ (r.url, r.content))
+ return False
except Exception, e:
print("Error [push_results_to_db('%s', '%s', '%s', '%s',"
"'%s', '%s', '%s', '%s', '%s')]:" %