From 18c690d801750089c2cf04f67a917cd562d59c63 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Tue, 7 Mar 2017 17:03:07 -0500 Subject: [PATCH] Add string comparison to ClaimOutpoint --- CHANGELOG.md | 2 +- lbrynet/core/Wallet.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36afb0d5d..524978a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ at anytime. * ### Fixed - * + * Added string comparison to ClaimOutpoint (needed to look things up by outpoint) * * diff --git a/lbrynet/core/Wallet.py b/lbrynet/core/Wallet.py index 9d09dc726..bb776499a 100644 --- a/lbrynet/core/Wallet.py +++ b/lbrynet/core/Wallet.py @@ -51,6 +51,8 @@ class ClaimOutpoint(dict): return (self['txid'], self['nout']) == (compare['txid'], compare['nOut']) elif 'nout' in compare: return (self['txid'], self['nout']) == (compare['txid'], compare['nout']) + elif type(compare) in [str, unicode]: + return compare == self.__repr__() else: raise TypeError('cannot compare {}'.format(type(compare)))