Compare commits
1 Commits
44c492313c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f76f0bcdf2 |
@ -202,7 +202,7 @@ def get_os_info() -> str:
|
|||||||
major_edition = f"{major} {edition}"
|
major_edition = f"{major} {edition}"
|
||||||
# 2. Build number
|
# 2. Build number
|
||||||
build = os_info.BuildNumber
|
build = os_info.BuildNumber
|
||||||
# 3. Install date (WMI gives an ISO‑8601 string)
|
# 3. Install date (WMI gives an ISO-8601 string)
|
||||||
# e.g. "20210930142300.000000+000"
|
# e.g. "20210930142300.000000+000"
|
||||||
install_ts = os_info.InstallDate[:14] # "20210930142300"
|
install_ts = os_info.InstallDate[:14] # "20210930142300"
|
||||||
dt = datetime.strptime(install_ts, "%Y%m%d%H%M%S")
|
dt = datetime.strptime(install_ts, "%Y%m%d%H%M%S")
|
||||||
@ -259,7 +259,7 @@ def server_reporter():
|
|||||||
try:
|
try:
|
||||||
response = requests.post(url, json=data_dict)
|
response = requests.post(url, json=data_dict)
|
||||||
|
|
||||||
# Raise an exception for non‑2xx status codes
|
# Raise an exception for non-2xx status codes
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
result = response.json()
|
result = response.json()
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user