Replace errors with exceptions

This commit is contained in:
Stuckinaboot
2018-10-29 13:13:39 +01:00
parent 2544f8dff5
commit e93ced5f6a
4 changed files with 18 additions and 12 deletions

View File

@ -20,7 +20,8 @@ class IPeerStore(ABC, IAddrBook, IPeerMetadata):
def get_protocols(self, peer_id):
"""
:param peer_id: peer ID to get protocols for
:return: protocols (as strings), error
:return: protocols (as strings)
:raise Exception: peer ID not found exception
"""
pass
@ -29,7 +30,7 @@ class IPeerStore(ABC, IAddrBook, IPeerMetadata):
"""
:param peer_id: peer ID to add protocols for
:param protocols: protocols to add
:return: error
:raise Exception: peer ID not found exception
"""
pass
@ -38,7 +39,7 @@ class IPeerStore(ABC, IAddrBook, IPeerMetadata):
"""
:param peer_id: peer ID to set protocols for
:param protocols: protocols to set
:return: error
:raise Exception: peer ID not found exception
"""
pass