[Pkg-privacy-commits] [onionbalance] 36/117: Fix message formating for some logs and exceptions
Donncha O'Cearbahill
donncha-guest at moszumanska.debian.org
Wed Dec 16 23:18:44 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 91e8638fb981521df2654e8a3c47025de5ab532f
Author: Donncha O'Cearbhaill <donncha at donncha.is>
Date: Tue Jun 23 22:23:41 2015 +0100
Fix message formating for some logs and exceptions
---
onionbalance/descriptor.py | 8 ++++----
onionbalance/service.py | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/onionbalance/descriptor.py b/onionbalance/descriptor.py
index 5613282..0f5dcb3 100644
--- a/onionbalance/descriptor.py
+++ b/onionbalance/descriptor.py
@@ -38,7 +38,7 @@ def generate_service_descriptor(permanent_key, introduction_point_list=None,
if not introduction_point_list:
onion_address = util.calc_onion_address(permanent_key)
- raise ValueError("No introduction points for service '%s'.",
+ raise ValueError("No introduction points for service %s.onion." %
onion_address)
# Generate the introduction point section of the descriptor
@@ -187,7 +187,7 @@ def fetch_descriptor(controller, onion_address, hsdir=None):
raise stem.InvalidRequest(response_code, response_content)
else:
raise stem.ProtocolError("HSFETCH returned unexpected "
- "response code: %s", response_code)
+ "response code: %s" % response_code)
def descriptor_received(descriptor_content):
@@ -251,5 +251,5 @@ def upload_descriptor(controller, signed_descriptor, hsdirs=None):
raise stem.InvalidRequest(response_code, response_content)
else:
raise stem.ProtocolError("HSPOST returned unexpected response "
- "code: %s\n%s", response_code,
- response_content)
+ "code: %s\n%s" % (response_code,
+ response_content))
diff --git a/onionbalance/service.py b/onionbalance/service.py
index d1ebe32..fbe23d1 100644
--- a/onionbalance/service.py
+++ b/onionbalance/service.py
@@ -179,9 +179,9 @@ class Service(object):
logger.exception("Error uploading descriptor for service "
"%s.onion.", self.onion_address)
else:
- logger.debug("Published a descriptor for service "
- "%s.onion under replica %d.",
- self.onion_address, replica)
+ logger.info("Published a descriptor for service "
+ "%s.onion under replica %d.",
+ self.onion_address, replica)
# It would be better to set last_uploaded when an upload succeeds and
# not when an upload is just attempted. Unfortunately the HS_DESC #
@@ -200,8 +200,8 @@ class Service(object):
self._descriptor_not_uploaded_recently(),
force_publish]):
- logger.info("Publishing a descriptor for service %s.onion.",
- self.onion_address)
+ logger.debug("Publishing a descriptor for service %s.onion.",
+ self.onion_address)
self._publish_descriptor()
# If the descriptor ID will change soon, need to upload under
--
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