[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [chutney/master] TorNet: rename getOnionService to isOnionService



commit 1111be0e53aeb0ad63a41644cf5690472f4a5838
Author: c <c@xxxxxxxxxxx>
Date:   Sun May 17 04:34:13 2020 +0000

    TorNet: rename getOnionService to isOnionService
    
    Function returns boolean so make its name clearer
---
 lib/chutney/TorNet.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 953d7f5..4bd926f 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -908,7 +908,7 @@ class LocalNodeController(NodeController):
         """
         return self.getDirServer() and not self.getBridge()
 
-    def getOnionService(self):
+    def isOnionService(self):
         """Is this node an onion service?"""
         if self._env['tag'].startswith('h'):
             return 1
@@ -959,7 +959,7 @@ class LocalNodeController(NodeController):
 
            Based on whether this node is an onion service.
         """
-        if self.getOnionService():
+        if self.isOnionService():
             return LocalNodeController.HS_WAIT_FOR_UNCHECKED_DIR_INFO
         else:
             return LocalNodeController.NODE_WAIT_FOR_UNCHECKED_DIR_INFO
@@ -1221,9 +1221,9 @@ class LocalNodeController(NodeController):
         """Return true iff the logfile says that this instance is
            bootstrapped."""
         pct, _, _ = self.getLastBootstrapStatus()
-        if self.getOnionService():
         if pct != LocalNodeController.SUCCESS_CODE:
             return False
+        if self.isOnionService():
             pct, _, _ = self.getLastOnionServiceDescStatus()
             if pct != LocalNodeController.ONIONDESC_PUBLISHED_CODE:
                 return False



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits