From 19b4a800fc4376d5f4ec2e9164aad703c65d8484 Mon Sep 17 00:00:00 2001 From: Amirreza Taherkhani Date: Mon, 17 Jul 2023 14:32:30 +0330 Subject: [PATCH] Update errors.py --- ippanel/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ippanel/errors.py b/ippanel/errors.py index 0069632..dfad815 100644 --- a/ippanel/errors.py +++ b/ippanel/errors.py @@ -26,6 +26,6 @@ class HTTPError(Exception): pass def parse_errors(response: Response): - if response.code != 200 or response.error_message != '': + if response.code != 200 or response.error_message != '' and response.error_message is not None: return Error(response.code, response.error_message) return