fix handling deprecated commands in lbrynet-cli
This commit is contained in:
parent
21ab4fb9c0
commit
7e685f764f
1 changed files with 6 additions and 2 deletions
|
@ -56,8 +56,12 @@ def main():
|
||||||
return
|
return
|
||||||
|
|
||||||
if method not in Daemon.callable_methods:
|
if method not in Daemon.callable_methods:
|
||||||
|
if method not in Daemon.deprecated_methods:
|
||||||
print_error("\"%s\" is not a valid command." % method)
|
print_error("\"%s\" is not a valid command." % method)
|
||||||
return
|
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]
|
fn = Daemon.callable_methods[method]
|
||||||
if hasattr(fn, "_flags"):
|
if hasattr(fn, "_flags"):
|
||||||
|
|
Loading…
Reference in a new issue