mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
suppress urllib3 insecure warnings in the CLI
This commit is contained in:
@@ -2,6 +2,7 @@ import json
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
import yaml
|
import yaml
|
||||||
|
import urllib3
|
||||||
|
|
||||||
from requests.exceptions import ConnectionError, SSLError
|
from requests.exceptions import ConnectionError, SSLError
|
||||||
|
|
||||||
@@ -11,6 +12,11 @@ from awxkit.exceptions import Unauthorized, Common
|
|||||||
from awxkit.cli.utils import cprint
|
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=[]):
|
def run(stdout=sys.stdout, stderr=sys.stderr, argv=[]):
|
||||||
cli = CLI(stdout=stdout, stderr=stderr)
|
cli = CLI(stdout=stdout, stderr=stderr)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user