From e03db79f79fdf4c20a960485b15cdf468af4dba8 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 16 Nov 2016 23:56:57 -0500 Subject: [PATCH] Always return array from jsonrpc_get_lbry_files() Before, would return false when there were no files in the DB. --- lbrynet/lbrynet_daemon/Daemon.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index 2e03a94ac..8f35206ec 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -1325,8 +1325,7 @@ class Daemon(AuthJSONRPCServer): """ d = self._get_lbry_files() - d.addCallback(lambda r: [d[1] for d in r]) - d.addCallback(lambda r: self._render_response(r, OK_CODE) if len(r) else self._render_response(False, OK_CODE)) + d.addCallback(lambda r: self._render_response([d[1] for d in r], OK_CODE)) return d