Merge pull request #4576 from ryanpetrello/ssl-insecure-cli

suppress urllib3 insecure warnings in the CLI

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-08-23 15:22:22 +00:00 committed by GitHub
commit 90af9a9e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: