]> git.mxchange.org Git - fba.git/blobdiff - fba/instances.py
WIP(?):
[fba.git] / fba / instances.py
index 27ea9d39c3d0c5886f04df41ce22aa9bb2941212..7e3d2012949f18fbef5c0c5da28842693493fd71 100644 (file)
@@ -49,8 +49,6 @@ _pending = {
     "last_status_code"   : {},
     # Last error details
     "last_error_details" : {},
-    # Whether CSRF tokens are present
-    "has_csrf"           : {},
 }
 
 def set_data(key: str, domain: str, value: any):
@@ -258,37 +256,37 @@ def update_last_nodeinfo(domain: str):
     # DEBUG: print("DEBUG: EXIT!")
 
 def update_last_error(domain: str, error: dict):
-    print("DEBUG: domain,error[]:", domain, type(error))
+    # DEBUG: print("DEBUG: domain,error[]:", domain, type(error))
     if not isinstance(domain, str):
         raise ValueError(f"Parameter domain[]={type(domain)} is not 'str'")
     elif domain == "":
         raise ValueError("Parameter 'domain' is empty")
 
-    print("DEBUG: BEFORE error[]:", type(error))
+    # DEBUG: print("DEBUG: BEFORE error[]:", type(error))
     if isinstance(error, BaseException) or isinstance(error, json.decoder.JSONDecodeError):
         error = f"error[{type(error)}]='{str(error)}'"
-    print("DEBUG: AFTER error[]:", type(error))
+    # DEBUG: print("DEBUG: AFTER error[]:", type(error))
 
     if isinstance(error, str):
-        print(f"DEBUG: Setting last_error_details='{error}'")
+        # DEBUG: print(f"DEBUG: Setting last_error_details='{error}'")
         set_data("last_status_code"  , domain, 999)
         set_data("last_error_details", domain, error)
     elif isinstance(error, requests.models.Response):
-        print(f"DEBUG: Setting last_error_details='{error.reason}'")
+        # DEBUG: print(f"DEBUG: Setting last_error_details='{error.reason}'")
         set_data("last_status_code"  , domain, error.status_code)
         set_data("last_error_details", domain, error.reason)
     else:
-        print(f"DEBUG: Setting last_error_details='{error['error_message']}'")
+        # DEBUG: print(f"DEBUG: Setting last_error_details='{error['error_message']}'")
         set_data("last_status_code"  , domain, error["status_code"])
         set_data("last_error_details", domain, error["error_message"])
 
     # Running pending updated
-    print(f"DEBUG: Invoking update_data({domain}) ...")
+    # DEBUG: print(f"DEBUG: Invoking update_data({domain}) ...")
     update_data(domain)
 
     fba.log_error(domain, error)
 
-    print("DEBUG: EXIT!")
+    # DEBUG: print("DEBUG: EXIT!")
 
 def is_registered(domain: str) -> bool:
     # DEBUG: print(f"DEBUG: domain='{domain}' - CALLED!")