From 2e62aae380a6223b04e72cedad304c83eef0f007 Mon Sep 17 00:00:00 2001 From: ndom91 Date: Tue, 2 Jan 2024 15:27:46 +0100 Subject: [PATCH] fix: disable ssl warnings --- README.md | 2 -- netbox_api.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ad52941e..37afd780 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ This library is intended to be your friend and help you import all the device-types defined within the the [NetBox Device Type Library Repository](https://github.com/netbox-community/devicetype-library). -> Tested working with 2.9.4, 2.10.4 - ## 🪄 Description This script will clone a copy of the `netbox-community/devicetype-library` repository to your machine to allow it to import the device types you would like without copy and pasting them into the Netbox UI. diff --git a/netbox_api.py b/netbox_api.py index f848d492..60c6d1e6 100644 --- a/netbox_api.py +++ b/netbox_api.py @@ -34,7 +34,7 @@ def connect_api(self): self.netbox = pynetbox.api(self.url, token=self.token) if self.ignore_ssl: self.handle.verbose_log("IGNORE_SSL_ERRORS is True, catching exception and disabling SSL verification.") - #requests.packages.urllib3.disable_warnings() + requests.packages.urllib3.disable_warnings() self.netbox.http_session.verify = False except Exception as e: self.handle.exception("Exception", 'NetBox API Error', e)