Skip to content

Commit 57b7659

Browse files
author
rincewind
committed
Fix missing self and remove warnings
1 parent 8276f0e commit 57b7659

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

check_vmware_nsxt.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def request(self, url, method='GET', **kwargs):
114114
self.logger.debug("starting API %s request from: %s", method, url)
115115

116116
try:
117-
response = requests.request(method, request_url, auth=HTTPBasicAuth(self.username, self.password), verify=verify)
117+
response = requests.request(method, request_url, auth=HTTPBasicAuth(self.username, self.password), verify=self.verify)
118118
except requests.exceptions.RequestException as e:
119119
raise CriticalException(e)
120120

@@ -406,6 +406,9 @@ def main():
406406
fix_tls_cert_store()
407407

408408
args = parse_args()
409+
if args.verify == False:
410+
import urllib3
411+
urllib3.disable_warnings()
409412

410413
if args.version:
411414
print("check_vmware_nsxt version %s" % VERSION)

0 commit comments

Comments
 (0)