fix cli version and --version arguments

This commit is contained in:
Jack Robison 2017-06-08 19:08:51 -04:00
parent 53f2147ecb
commit 869a95c4c7
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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