mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
suppress urllib3 insecure warnings in the CLI
This commit is contained in:
parent
39a96a620e
commit
70ce074f5a
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user