Skip to content

Commit 489fe2c

Browse files
committed
Fix UA for request to update center
1 parent c5eaf7f commit 489fe2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sonar/platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ def __lta_and_latest() -> tuple[tuple[int, int, int], tuple[int, int, int]]:
788788
_, tmpfile = tempfile.mkstemp(prefix="sonar-tools", suffix=".txt", text=True)
789789
try:
790790
with open(tmpfile, "w", encoding="utf-8") as fp:
791-
print(requests.get(_UPDATE_CENTER, headers=_SONAR_TOOLS_AGENT, timeout=10).text, file=fp)
791+
print(requests.get(_UPDATE_CENTER, headers={"user-agent": _SONAR_TOOLS_AGENT}, timeout=10).text, file=fp)
792792
with open(tmpfile, "r", encoding="utf-8") as fp:
793793
upd_center_props = jprops.load_properties(fp)
794794
v = upd_center_props.get("ltsVersion", "9.9.0").split(".")

0 commit comments

Comments
 (0)