v1.1.33: CMDB delete logging — log HTTP status code

This commit is contained in:
2026-07-29 14:09:56 +04:00
parent b6a497400c
commit 65d10d5c35
3 changed files with 8 additions and 7 deletions
+4 -5
View File
@@ -120,10 +120,9 @@ class HttpClient:
def raw_delete(self, url):
"""DELETE-запрос к произвольному URL (CMDB API).
Не добавляет Nubes-эндпоинт — используется для жёсткого удаления инстансов.
Возвращает True если 2xx, иначе False."""
Возвращает кортеж (ok: bool, status_code: int)."""
try:
r = self._session.delete(url, timeout=10)
return r.ok
except Exception:
return False
return r.ok, r.status_code
except Exception as e:
return False, str(e)