Merge pull request #677 from lbryio/fix-version-cli
fix cli version and --version arguments
This commit is contained in:
commit
515b3124db
2 changed files with 6 additions and 1 deletions
|
@ -15,7 +15,7 @@ at anytime.
|
||||||
### Changed
|
### Changed
|
||||||
* Do not catch base exception in API command resolve
|
* Do not catch base exception in API command resolve
|
||||||
* Remove deprecated `lbrynet.metadata` and update what used it to instead use `lbryschema`
|
* Remove deprecated `lbrynet.metadata` and update what used it to instead use `lbryschema`
|
||||||
*
|
* Get version information locally instead of via api for cli
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* Download analytics error
|
* Download analytics error
|
||||||
|
|
|
@ -8,6 +8,7 @@ from lbrynet import conf
|
||||||
from lbrynet.core import utils
|
from lbrynet.core import utils
|
||||||
from lbrynet.lbrynet_daemon.auth.client import JSONRPCException, LBRYAPIClient
|
from lbrynet.lbrynet_daemon.auth.client import JSONRPCException, LBRYAPIClient
|
||||||
from lbrynet.lbrynet_daemon.Daemon import LOADING_WALLET_CODE, Daemon
|
from lbrynet.lbrynet_daemon.Daemon import LOADING_WALLET_CODE, Daemon
|
||||||
|
from lbrynet.core.system_info import get_platform
|
||||||
from jsonrpc.common import RPCError
|
from jsonrpc.common import RPCError
|
||||||
from urllib2 import URLError, HTTPError
|
from urllib2 import URLError, HTTPError
|
||||||
from httplib import UNAUTHORIZED
|
from httplib import UNAUTHORIZED
|
||||||
|
@ -50,6 +51,10 @@ def main():
|
||||||
print_help()
|
print_help()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
elif method in ['version', '--version']:
|
||||||
|
print utils.json_dumps_pretty(get_platform(get_ip=False))
|
||||||
|
return
|
||||||
|
|
||||||
if method not in Daemon.callable_methods:
|
if method not in Daemon.callable_methods:
|
||||||
print_error("\"%s\" is not a valid command." % method)
|
print_error("\"%s\" is not a valid command." % method)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue