mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-28 16:01:28 +00:00
Merge pull request #656 from lbryio/fix_resolve_exception
catch UnknownNamError instead of base Exception for resolve command
This commit is contained in:
commit
11dc17d131
5 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ at anytime.
|
||||||
*
|
*
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
*
|
* Do not catch base exception in API command resolve
|
||||||
*
|
*
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -701,7 +701,7 @@ class Wallet(object):
|
||||||
raise UnknownNameError("No results to return")
|
raise UnknownNameError("No results to return")
|
||||||
|
|
||||||
if 'error' in results:
|
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'])
|
raise UnknownNameError(results['error'])
|
||||||
else:
|
else:
|
||||||
raise Exception(results['error'])
|
raise Exception(results['error'])
|
||||||
|
|
|
@ -1538,7 +1538,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
resolved = yield self.session.wallet.resolve_uri(uri, check_cache=not force)
|
resolved = yield self.session.wallet.resolve_uri(uri, check_cache=not force)
|
||||||
except Exception:
|
except UnknownNameError:
|
||||||
resolved = None
|
resolved = None
|
||||||
results = yield self._render_response(resolved)
|
results = yield self._render_response(resolved)
|
||||||
defer.returnValue(results)
|
defer.returnValue(results)
|
||||||
|
|
|
@ -14,7 +14,7 @@ jsonrpc==1.2
|
||||||
jsonrpclib==0.1.7
|
jsonrpclib==0.1.7
|
||||||
jsonschema==2.5.1
|
jsonschema==2.5.1
|
||||||
git+https://github.com/lbryio/lbryschema.git@v0.0.6#egg=lbryschema
|
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
|
miniupnpc==1.9
|
||||||
pbkdf2==1.3
|
pbkdf2==1.3
|
||||||
pycrypto==2.6.1
|
pycrypto==2.6.1
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -21,7 +21,7 @@ requires = [
|
||||||
'envparse',
|
'envparse',
|
||||||
'jsonrpc',
|
'jsonrpc',
|
||||||
'jsonschema',
|
'jsonschema',
|
||||||
'lbryum==2.7.23',
|
'lbryum==2.7.24',
|
||||||
'lbryschema==0.0.6',
|
'lbryschema==0.0.6',
|
||||||
'miniupnpc',
|
'miniupnpc',
|
||||||
'pycrypto',
|
'pycrypto',
|
||||||
|
|
Loading…
Add table
Reference in a new issue