mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Replace errors with exceptions
This commit is contained in:
@ -28,4 +28,5 @@ class PeerData(IPeerData):
|
||||
def get_metadata(self, key):
|
||||
if key in self.metadata:
|
||||
return self.metadata[key], None
|
||||
return None, "key not found"
|
||||
else:
|
||||
raise Exception("key not found")
|
||||
|
||||
Reference in New Issue
Block a user