[tor-commits] [bridgedb/master] Combine message string for two raised exceptions.

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:32 UTC 2014


commit d62a66ada1591695cfad2504437f622d4acc5535
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Nov 16 00:33:09 2013 +0000

    Combine message string for two raised exceptions.
---
 lib/bridgedb/parse/networkstatus.py |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/bridgedb/parse/networkstatus.py b/lib/bridgedb/parse/networkstatus.py
index d38257d..9b1bb01 100644
--- a/lib/bridgedb/parse/networkstatus.py
+++ b/lib/bridgedb/parse/networkstatus.py
@@ -92,8 +92,8 @@ def parseRLine(line):
 
         if ID.endswith('='):
             raise InvalidNetworkstatusRouterIdentity(
-                "Skipping networkstatus parsing for router with nickname %r: ",
-                "Unpadded, base64-encoded networkstatus router identity ",
+                "Skipping networkstatus parsing for router with nickname %r:"\
+                "\n\tUnpadded, base64-encoded networkstatus router identity "\
                 "string ends with '=': %r" % (nickname, ID))
         try:
             ID = padBase64(ID) # Add the trailing equals sign back in
@@ -103,9 +103,9 @@ def parseRLine(line):
         ID = binascii.a2b_base64(ID) 
         if not ID:
             raise InvalidNetworkstatusRouterIdentity(
-                "Skipping networkstatus parsing for router with nickname %r: ",
-                "Base64-encoding for networkstatus router identity string is ",
-                "invalid! Line: %r" % (nickname, line))
+                "Skipping networkstatus parsing for router with nickname %r:"\
+                "\n\tBase64-encoding for networkstatus router identity string"\
+                "is invalid!\n\tLine: %r" % (nickname, line))
 
     except IndexError as error:
         logging.error(error.message)





More information about the tor-commits mailing list