Skip to content

Commit

Permalink
Update repology client user-agent
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Dec 1, 2023
1 parent 7fa1a06 commit 7dfa8aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/repology/repology_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(self):
# - Cache all responses locally for 7200 seconds
self.session = CachedLimiterSession(per_second=1, expire_after=7200)
ua_product = "repology_cli/0"
ua_comment = "(https://github.com/tiiuae/sbomnix/tree/main/scripts/repology)"
ua_comment = "(https://github.com/tiiuae/sbomnix/)"
self.headers = {"User-Agent": f"{ua_product} {ua_comment}"}

def _packages_to_df(self, args, re_pkg_internal=None):
Expand Down
2 changes: 1 addition & 1 deletion src/repology/repology_cve.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def query_cve(pkg_name, pkg_version):
"""
session = CachedLimiterSession(per_second=1, expire_after=7200)
ua_product = "repology_cli/0"
ua_comment = "(https://github.com/tiiuae/sbomnix/tree/main/scripts/repology)"
ua_comment = "(https://github.com/tiiuae/sbomnix/)"
headers = {"User-Agent": f"{ua_product} {ua_comment}"}
pkg = urllib.parse.quote(pkg_name)
ver = urllib.parse.quote(pkg_version)
Expand Down

0 comments on commit 7dfa8aa

Please sign in to comment.