Add --insecure to curl output if required

When the --insecure option is given, the curl command did not have
certificate verification turned off.

Partial-Bug: #1249891
Change-Id: Ia4f21d03f060bac0db51a79b89b0246b2ee3d041
This commit is contained in:
Kieran Spear
2013-10-24 15:56:47 +11:00
parent dca1d4259d
commit 6454bc2894

View File

@@ -89,6 +89,9 @@ def request(url, method='GET', headers=None, original_ip=None, debug=False,
if debug:
string_parts = ['curl -i']
if not kwargs.get('verify', True):
string_parts.append(' --insecure')
if method:
string_parts.append(' -X %s' % method)