X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=p2pool%2Fp2p.py;h=6383ef910204a1348fe57131eead1732d3e4fc76;hb=3ca723ee19cb8e2ee54e32a81e0d3caa2ff51441;hp=cd85a2ee97a5c9346c97e8b0f10d1a1b7c44060f;hpb=fc98547deffa225b47f77393d914d0165bcd5a7d;p=p2pool.git diff --git a/p2pool/p2p.py b/p2pool/p2p.py index cd85a2e..6383ef9 100644 --- a/p2pool/p2p.py +++ b/p2pool/p2p.py @@ -330,11 +330,12 @@ class Protocol(p2protocol.Protocol): ('result', pack.EnumType(pack.VarIntType(), {0: 'good', 1: 'too long', 2: 'unk2', 3: 'unk3', 4: 'unk4', 5: 'unk5', 6: 'unk6'})), ('shares', pack.ListType(p2pool_data.share_type)), ]) + class ShareReplyError(Exception): pass def handle_sharereply(self, id, result, shares): if result == 'good': res = [p2pool_data.load_share(share, self.node.net, self.addr) for share in shares if share['type'] >= 9] else: - res = failure.Failure("sharereply result: " + result) + res = failure.Failure(self.ShareReplyError(result)) self.get_shares.got_response(id, res)