diff --git a/network/multiaddr.py b/network/multiaddr.py index 38c826d..e6d4a5c 100644 --- a/network/multiaddr.py +++ b/network/multiaddr.py @@ -8,7 +8,7 @@ class Multiaddr: protocol_map = dict() split_addr = addr.split("/") - if len(split_addr) == 0 or len(split_addr) % 2 != 0: + if not split_addr or len(split_addr) % 2 != 0: raise MultiaddrValueError("Invalid input multiaddr.") is_protocol = True