From 11a22c91d91fc02f19543c47d576c27ee5ea9fd7 Mon Sep 17 00:00:00 2001 From: Alix Cook Date: Mon, 14 Oct 2019 10:04:31 -0400 Subject: [PATCH] env var to skip cert verify for dev contexts failed lint --- requirements.txt | 1 + src/lavatory/utils/artifactory.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 64c60e6..d2479c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ requests humanfriendly party pluginbase +django diff --git a/src/lavatory/utils/artifactory.py b/src/lavatory/utils/artifactory.py index df80668..2a726d3 100644 --- a/src/lavatory/utils/artifactory.py +++ b/src/lavatory/utils/artifactory.py @@ -30,7 +30,8 @@ def __init__(self, repo_name=None): self.artifactory.artifactory_url = self.api_url self.artifactory.username = self.credentials['artifactory_username'] self.artifactory.password = base64.encodebytes(bytes(self.credentials['artifactory_password'], 'utf-8')) - self.artifactory.certbundle = os.getenv('LAVATORY_CERTBUNDLE_PATH', certifi.where()) + skip_verify = int(os.getenv('LAVATORY_SKIP_CERT_VERIFY', '1')) + self.artifactory.certbundle = False if skip_verify else os.getenv('LAVATORY_CERTBUNDLE_PATH', certifi.where()) def repos(self, repo_type='local'): """