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

@ -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")