add auth check
This commit is contained in:
@@ -130,15 +130,12 @@ def parse_identification_config_csv(csv_text: str) -> dict:
|
||||
def download_identification_config(timeout=20) -> dict:
|
||||
"""Download the current customer's CSV config through the cloud server."""
|
||||
import requests
|
||||
from api import data_record_url, the_folder
|
||||
from api import device_post
|
||||
|
||||
try:
|
||||
response = requests.post(data_record_url, json={
|
||||
result = device_post({
|
||||
"type": "getIdentificationConfig",
|
||||
"deviceId": the_folder,
|
||||
}, timeout=timeout)
|
||||
response.raise_for_status()
|
||||
result = response.json()
|
||||
except Exception as exc:
|
||||
raise ValueError(f"连接云服务器辨识配置服务失败: {exc}") from exc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user