[Pkg-privacy-commits] [onionbalance] 70/117: Removed unused fetch_descriptor(), now using stem get_hidden_service_descriptor() method

Donncha O'Cearbahill donncha-guest at moszumanska.debian.org
Wed Dec 16 23:18:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

donncha-guest pushed a commit to branch debian/sid
in repository onionbalance.

commit 96cb5a2a96a95499c94d241ff9f9f04a9d1f519f
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date:   Tue Jun 30 12:43:05 2015 +0100

    Removed unused fetch_descriptor(), now using stem get_hidden_service_descriptor() method
---
 onionbalance/descriptor.py | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/onionbalance/descriptor.py b/onionbalance/descriptor.py
index d3a915b..eadf1a5 100644
--- a/onionbalance/descriptor.py
+++ b/onionbalance/descriptor.py
@@ -168,28 +168,6 @@ def sign_descriptor(descriptor, service_key):
     return descriptor + signature_with_headers
 
 
-def fetch_descriptor(controller, onion_address, hsdir=None):
-    """
-    Try fetch a HS descriptor from any of the responsible HSDirs. Initiate
-    fetch from hsdir only if it is specified.
-    """
-
-    if hsdir:
-        server_arg = " SERVER={}".format(hsdir)
-    else:
-        server_arg = ""
-
-    logger.debug("Sending descriptor fetch for %s.onion.", onion_address)
-    response = controller.msg("HSFETCH %s%s" % (onion_address, server_arg))
-    (response_code, _, response_content) = response.content()[0]
-    if not response.is_ok():
-        if response_code == "552":
-            raise stem.InvalidRequest(response_code, response_content)
-        else:
-            raise stem.ProtocolError("HSFETCH returned unexpected "
-                                     "response code: %s" % response_code)
-
-
 def descriptor_received(descriptor_content):
     """
     Process onion service descriptors retrieved from the HSDir system or

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionbalance.git



More information about the Pkg-privacy-commits mailing list