[tor-commits] [chutney/master] TorNet: clarify to run updateLastStatus() first

nickm at torproject.org nickm at torproject.org
Tue Jul 7 15:12:53 UTC 2020


commit f43449e53d0f798c9f62d5507145ec9956b17ffd
Author: c <c at chroniko.jp>
Date:   Thu May 21 08:01:31 2020 +0000

    TorNet: clarify to run updateLastStatus() first
    
    Clarify in getLast*() and isBoostrapped() function documentation that
    updateLastStatus() affects these functions and must be called first.
---
 lib/chutney/TorNet.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 76512ab..6f71963 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -1194,6 +1194,9 @@ class LocalNodeController(NodeController):
         """Return the last onion descriptor message fetched by
            updateLastOnionServiceDescStatus as a 3-tuple of percentage
            complete, the hidden service version, and message.
+
+           The return status depends on the last time updateLastStatus()
+           was called; that function must be called before this one.
         """
         return self.most_recent_oniondesc_status
 
@@ -1221,6 +1224,9 @@ class LocalNodeController(NodeController):
         """Return the last bootstrap message fetched by
            updateLastBootstrapStatus as a 3-tuple of percentage
            complete, keyword (optional), and message.
+
+           The return status depends on the last time updateLastStatus()
+           was called; that function must be called before this one.
         """
         return self.most_recent_bootstrap_status
 
@@ -1233,7 +1239,11 @@ class LocalNodeController(NodeController):
 
     def isBootstrapped(self):
         """Return true iff the logfile says that this instance is
-           bootstrapped."""
+           bootstrapped.
+
+           The return status depends on the last time updateLastStatus()
+           was called; that function must be called before this one.
+        """
         pct, _, _ = self.getLastBootstrapStatus()
         if pct != LocalNodeController.SUCCESS_CODE:
             return False





More information about the tor-commits mailing list