Skip to content

Commit

Permalink
Set ssl verify for Bugzilla & Gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Sep 7, 2023
1 parent 3a8d503 commit 45e0e28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bugme.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def do_bugzilla(url: str, bugs: list, creds):
"""
if len(bugs) == 0:
return
sslverify = os.environ.get("REQUESTS_CA_BUNDLE", True)
try:
mybugz = Bugzilla(url, force_rest=True, **creds)
mybugz = Bugzilla(url, force_rest=True, sslverify=sslverify, **creds)
for bug in mybugz.getbugs(bugs):
print(f"bsc#{bug.id}\t{bug.status}\t\t{dateit(bug.last_change_time)}\t{bug.summary}")
mybugz.disconnect()
Expand Down Expand Up @@ -67,7 +68,8 @@ def do_gitlab(url: str, issues: list, creds: dict):
"""
if len(issues) == 0:
return
with Gitlab(url=url, **creds) as mygl:
ssl_verify = os.getenv("REQUESTS_CA_BUNDLE") if url else True
with Gitlab(url=url, ssl_verify=ssl_verify, retry_transient_errors=False, **creds) as mygl:
for issue in issues:
try:
info = mygl.projects.get(issue.repo, lazy=True).issues.get(issue.number)
Expand Down

0 comments on commit 45e0e28

Please sign in to comment.