Move full_path just in case to make sure exception message is valid.

This commit is contained in:
Cossid
2026-01-06 08:46:22 -06:00
parent 874c1cecca
commit 0018fc97d5

View File

@@ -28,8 +28,8 @@ UF2_FAMILY_MAP = {
def api_get(short_path):
full_path = f"https://tuya-cloudcutter.github.io/api/{short_path}"
try:
full_path = f"https://tuya-cloudcutter.github.io/api/{short_path}"
with requests.get(full_path, timeout=(10, 60)) as r:
if r.status_code == 404:
print("The specified device does not exist in the API.")