Skip to content

Commit

Permalink
Fix SSL warnings on valid certificates for openQA servers
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Aug 29, 2023
1 parent 8045a68 commit 073bb3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ocw/lib/openqa.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from urllib.parse import urlparse
from cachetools import cached
import requests
Expand Down Expand Up @@ -52,7 +53,10 @@ def __new__(cls, **kwargs):
def __init__(self, **kwargs):
kwargs.pop("server")
self.__client = openqa_client.client.OpenQA_Client(server=self.server, **kwargs)
self.__client.session.verify = verify_tls(self.server)
if verify_tls(self.server):
self.__client.session.verify = os.environ.get("REQUESTS_CA_BUNDLE", False)
else
self.__client.session.verify = False

def is_cancelled(self, job_id: str) -> bool:
if not job_id.isdigit():
Expand Down

0 comments on commit 073bb3c

Please sign in to comment.