From 54bbce097db9caaeeeda04bd547f2798221591ed Mon Sep 17 00:00:00 2001 From: Matthew Harmsen Date: Sun, 1 Nov 2015 23:18:53 -0700 Subject: Added automatic Tomcat migration. The pki-server migrate command has been modified such that if there is no specific Tomcat version specified it will use the current Tomcat version. The top attribute in the CLI class was not functioning properly, so it has been replaced with get_top_module() method. The getopt() invocations in pki-server subcommands have been replaced with gnu_getopt() to allow intermixing options and arguments. https://fedorahosted.org/pki/ticket/1310 (based upon Edewata patch c7bc6eb94aa64c89467f9394554f860dc485ad94) --- base/common/python/pki/cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'base/common/python/pki/cli.py') diff --git a/base/common/python/pki/cli.py b/base/common/python/pki/cli.py index 4379780b2..2c51056f8 100644 --- a/base/common/python/pki/cli.py +++ b/base/common/python/pki/cli.py @@ -31,7 +31,6 @@ class CLI(object): self.name = name self.description = description self.parent = None - self.top = self self.verbose = False self.debug = False @@ -59,11 +58,15 @@ class CLI(object): def add_module(self, module): self.modules[module.name] = module module.parent = self - module.top = self.top def get_module(self, name): return self.modules.get(name) + def get_top_module(self): + if self.parent: + return self.parent.get_top_module() + return self + def print_message(self, message): print '-' * len(message) print message -- cgit