]> git.mxchange.org Git - fba.git/blobdiff - fba/federation/misskey.py
Continued:
[fba.git] / fba / federation / misskey.py
index 0a6ee127da10e5423e4d8b51d75716f7f0789c31..549ff17a2d950b90a5415075cc8469e6cbd31866 100644 (file)
@@ -100,7 +100,7 @@ def fetch_peers(domain: str) -> list:
             break
 
     # DEBUG: print(f"DEBUG: Adding '{len(peers)}' for domain='{domain}'")
-    instances.set("total_peers", domain, len(peers))
+    instances.set_data("total_peers", domain, len(peers))
 
     # DEBUG: print(f"DEBUG: Updating last_instance_fetch for domain='{domain}' ...")
     instances.update_last_instance_fetch(domain)
@@ -177,12 +177,12 @@ def fetch_blocks(domain: str) -> dict:
 
             # DEBUG: print(f"DEBUG: count={count}")
             if count == 0:
-                # DEBUG: print(f"DEBUG: API is no more returning new instances, aborting loop!")
+                # DEBUG: print("DEBUG: API is no more returning new instances, aborting loop!")
                 break
 
-        except BaseException as exception:
-            print("WARNING: Caught error, exiting loop:", domain, exception)
-            instances.update_last_error(domain, exception)
+        except BaseException as exc:
+            print("WARNING: Caught error, exiting loop:", domain, exc)
+            instances.update_last_error(domain, exc)
             offset = 0
             break
 
@@ -234,12 +234,12 @@ def fetch_blocks(domain: str) -> dict:
 
             # DEBUG: print(f"DEBUG: count={count}")
             if count == 0:
-                # DEBUG: print(f"DEBUG: API is no more returning new instances, aborting loop!")
+                # DEBUG: print("DEBUG: API is no more returning new instances, aborting loop!")
                 break
 
-        except BaseException as exception:
-            print("ERROR: Exception during POST:", domain, exception)
-            instances.update_last_error(domain, exception)
+        except BaseException as exc:
+            print("ERROR: Exception during POST:", domain, exc)
+            instances.update_last_error(domain, exc)
             offset = 0
             break