fix handling deprecated commands in lbrynet-cli

This commit is contained in:
Jack Robison 2017-08-15 11:48:56 -04:00
parent 21ab4fb9c0
commit 7e685f764f
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -56,8 +56,12 @@ def main():
return
if method not in Daemon.callable_methods:
print_error("\"%s\" is not a valid command." % method)
return
if method not in Daemon.deprecated_methods:
print_error("\"%s\" is not a valid command." % method)
return
new_method = Daemon.deprecated_methods[method]._new_command
print_error("\"%s\" is deprecated, using \"%s\"." % (method, new_method))
method = new_method
fn = Daemon.callable_methods[method]
if hasattr(fn, "_flags"):