commit a2192c4d0fb0101526d96c3ad9267fcc653659ca Author: Isis Lovecruft isis@torproject.org Date: Fri Feb 21 20:50:01 2014 +0000
Fix error when desc digest parsed from networkstatus is None.
* FIXES a bug where, if the nickname was not to spec (longer than 19 characters), then the nickname and descriptor digest are both set to ``None`` and ``bridgedb.Bridges.parseStatusFile()`` attempts to format the null descriptor digest into hexadecimal. --- lib/bridgedb/Bridges.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py index 4aaf86f..e5d5921 100644 --- a/lib/bridgedb/Bridges.py +++ b/lib/bridgedb/Bridges.py @@ -641,12 +641,12 @@ def parseStatusFile(networkstatusFile): logging.debug(" Nickname: %s" % nickname) logging.debug(" Identity: %s" % hexID) if descDigest: - logging.debug(" Descriptor: {0}".format(toHex(descDigest))) + descDigest = toHex(descDigest) + logging.debug(" Descriptor: {0}".format(descDigest)) logging.debug(" Timestamp: {0}".format(timestamp)) logging.debug(" ORAddress: {0}".format(ORaddr)) logging.debug(" ORport: {0}".format(ORport)) logging.debug(" dirport: {0}".format(dirport)) - descDigest = toHex(descDigest)
elif ID and line.startswith("a "): try: