From 7e685f764f9bd564df82caf26806586c1adca453 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 15 Aug 2017 11:48:56 -0400 Subject: [PATCH] fix handling deprecated commands in lbrynet-cli --- lbrynet/daemon/DaemonCLI.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lbrynet/daemon/DaemonCLI.py b/lbrynet/daemon/DaemonCLI.py index d012cd23d..6af740e42 100644 --- a/lbrynet/daemon/DaemonCLI.py +++ b/lbrynet/daemon/DaemonCLI.py @@ -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"):