From 869a95c4c7f4448de89f38445b4caa3c567fe250 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 8 Jun 2017 19:08:51 -0400 Subject: [PATCH] fix cli version and --version arguments --- CHANGELOG.md | 2 +- lbrynet/lbrynet_daemon/DaemonCLI.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c93498f79..6ec6de7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ at anytime. ### Changed * Do not catch base exception in API command resolve * Remove deprecated `lbrynet.metadata` and update what used it to instead use `lbryschema` - * + * Get version information locally instead of via api for cli ### Fixed * Download analytics error diff --git a/lbrynet/lbrynet_daemon/DaemonCLI.py b/lbrynet/lbrynet_daemon/DaemonCLI.py index 278cb6b1d..e91cddd02 100644 --- a/lbrynet/lbrynet_daemon/DaemonCLI.py +++ b/lbrynet/lbrynet_daemon/DaemonCLI.py @@ -8,6 +8,7 @@ from lbrynet import conf from lbrynet.core import utils from lbrynet.lbrynet_daemon.auth.client import JSONRPCException, LBRYAPIClient from lbrynet.lbrynet_daemon.Daemon import LOADING_WALLET_CODE, Daemon +from lbrynet.core.system_info import get_platform from jsonrpc.common import RPCError from urllib2 import URLError, HTTPError from httplib import UNAUTHORIZED @@ -50,6 +51,10 @@ def main(): print_help() return + elif method in ['version', '--version']: + print utils.json_dumps_pretty(get_platform(get_ip=False)) + return + if method not in Daemon.callable_methods: print_error("\"%s\" is not a valid command." % method) return