Merge pull request #656 from lbryio/fix_resolve_exception

catch UnknownNamError instead of base Exception for resolve command
This commit is contained in:
Jack Robison 2017-06-01 16:35:46 -04:00 committed by GitHub
commit 11dc17d131
5 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@ at anytime.
*
### Changed
*
* Do not catch base exception in API command resolve
*
### Fixed

View file

@ -701,7 +701,7 @@ class Wallet(object):
raise UnknownNameError("No results to return")
if 'error' in results:
if results['error'] == 'name is not claimed':
if results['error'] in ['name is not claimed', 'claim not found']:
raise UnknownNameError(results['error'])
else:
raise Exception(results['error'])

View file

@ -1538,7 +1538,7 @@ class Daemon(AuthJSONRPCServer):
try:
resolved = yield self.session.wallet.resolve_uri(uri, check_cache=not force)
except Exception:
except UnknownNameError:
resolved = None
results = yield self._render_response(resolved)
defer.returnValue(results)

View file

@ -14,7 +14,7 @@ jsonrpc==1.2
jsonrpclib==0.1.7
jsonschema==2.5.1
git+https://github.com/lbryio/lbryschema.git@v0.0.6#egg=lbryschema
git+https://github.com/lbryio/lbryum.git@v2.7.23#egg=lbryum
git+https://github.com/lbryio/lbryum.git@v2.7.24#egg=lbryum
miniupnpc==1.9
pbkdf2==1.3
pycrypto==2.6.1

View file

@ -21,7 +21,7 @@ requires = [
'envparse',
'jsonrpc',
'jsonschema',
'lbryum==2.7.23',
'lbryum==2.7.24',
'lbryschema==0.0.6',
'miniupnpc',
'pycrypto',