]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_dht_Khashmir/actions.py
Various documentation fixes and additions.
[quix0rs-apt-p2p.git] / apt_dht_Khashmir / actions.py
index cc9861043f2e531274086e1f886f630c13390cde..1179713c22847fc3236cd95e61684b38c6cf0d80 100644 (file)
@@ -82,7 +82,7 @@ class ActionBase:
         self.callback = callback
         self.outstanding = 0
         self.outstanding_results = 0
-        self.finished = 0
+        self.finished = False
     
         def sort(a, b, num=self.num):
             """Sort nodes relative to the ID we are looking for."""
@@ -111,7 +111,7 @@ class ActionBase:
         if self.desired_results and ((len(self.results) >= abs(self.desired_results)) or
                                      (self.desired_results < 0 and
                                       len(self.answered) >= self.config['STORE_REDUNDANCY'])):
-            self.finished=1
+            self.finished = True
             result = self.generateResult()
             reactor.callLater(0, self.callback, *result)
 
@@ -156,7 +156,7 @@ class ActionBase:
 
         # If no requests are outstanding, then we are done
         if self.outstanding == 0:
-            self.finished = 1
+            self.finished = True
             result = self.generateResult()
             reactor.callLater(0, self.callback, *result)