From 4bae3ad3c1d6f607e8637d762a1e749d11cb1ab3 Mon Sep 17 00:00:00 2001 From: zixuanzh Date: Fri, 26 Oct 2018 00:45:41 +0200 Subject: [PATCH] rename MultiAddr --- network/multiaddr.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/network/multiaddr.py b/network/multiaddr.py index d5de3e0..8fe58fb 100644 --- a/network/multiaddr.py +++ b/network/multiaddr.py @@ -1,4 +1,4 @@ -class Multiaddr: +class MultiAddr: # Validates input string and constructs internal representation. def __init__(self, addr): @@ -8,14 +8,14 @@ class Multiaddr: return if not addr[0] == "/": - raise MultiaddrValueError("Invalid input multiaddr.") + raise MultiAddrValueError("Invalid input multiaddr.") addr = addr[1:] protocol_map = dict() split_addr = addr.split("/") if not split_addr or len(split_addr) % 2 != 0: - raise MultiaddrValueError("Invalid input multiaddr.") + raise MultiAddrValueError("Invalid input multiaddr.") is_protocol = True curr_protocol = "" @@ -76,6 +76,6 @@ class Multiaddr: return addr -class MultiaddrValueError(ValueError): - """Raised when the input string to the Multiaddr constructor was invalid.""" +class MultiAddrValueError(ValueError): + """Raised when the input string to the MultiAddr constructor was invalid.""" pass