forked from LBRYCommunity/lbry-sdk
commit
2afc4c25a2
2 changed files with 5 additions and 3 deletions
|
@ -1235,7 +1235,9 @@ class Daemon(AuthJSONRPCServer):
|
|||
"""
|
||||
|
||||
log.info("Get daemon settings")
|
||||
return self._render_response(conf.settings.get_dict(), OK_CODE)
|
||||
settings_dict = conf.settings.get_dict()
|
||||
settings_dict['lbryid'] = binascii.hexlify(settings_dict['lbryid'])
|
||||
return self._render_response(settings_dict, OK_CODE)
|
||||
|
||||
@AuthJSONRPCServer.auth_required
|
||||
def jsonrpc_set_settings(self, p):
|
||||
|
|
|
@ -312,8 +312,8 @@ class AuthJSONRPCServer(AuthorizedBase):
|
|||
self._set_headers(request, encoded_message, auth_required)
|
||||
self._render_message(request, encoded_message)
|
||||
except Exception as err:
|
||||
msg = "Failed to render API response: %s"
|
||||
self._log_and_render_error(err, request, message=msg, version=version)
|
||||
log.exception("Failed to render API response: %s", result)
|
||||
self._render_error(err, request, version)
|
||||
|
||||
def _render_response(self, result, code):
|
||||
return defer.succeed({'result': result, 'code': code})
|
||||
|
|
Loading…
Reference in a new issue