suppress urllib3 insecure warnings in the CLI

This commit is contained in:
Ryan Petrello 2019-08-23 10:11:59 -04:00
parent 39a96a620e
commit 70ce074f5a
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -2,6 +2,7 @@ import json
import sys
import traceback
import yaml
import urllib3
from requests.exceptions import ConnectionError, SSLError
@ -11,6 +12,11 @@ from awxkit.exceptions import Unauthorized, Common
from awxkit.cli.utils import cprint
# you'll only see these warnings if you've explicitly *disabled* SSL
# verification, so they're a little annoying, redundant
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def run(stdout=sys.stdout, stderr=sys.stderr, argv=[]):
cli = CLI(stdout=stdout, stderr=stderr)
try: