Skip to content

Commit cb5324c

Browse files
[Hotfix Main]: Added Python version for user agent (#1353)
* Added Python version for user agent (#1350) * Added Python version for user agent * Fix lint * Fix conflict --------- Co-authored-by: Ben <106089368+benflexcompute@users.noreply.github.com> Co-authored-by: BenYuan <ben@flexcompute.com>
1 parent 64d3f9b commit cb5324c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

flow360/cloud/http_util.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""
55

66
import os
7+
import sys
78
from functools import wraps
89

910
import requests
@@ -22,7 +23,11 @@
2223

2324
def get_user_agent():
2425
"""Get the user agent the current environment."""
25-
return os.environ.get("FLOW360_AGENT", f"Python-Client/{__version__}")
26+
return os.environ.get(
27+
"FLOW360_AGENT",
28+
f"Python-Client/{__version__}/"
29+
f"Python-Version/{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
30+
)
2631

2732

2833
def api_key_auth(request):

0 commit comments

Comments
 (0)