mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
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:
commit
90af9a9e33
@ -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