diff options
| author | Matthew Harmsen <mharmsen@redhat.com> | 2015-11-01 23:18:53 -0700 |
|---|---|---|
| committer | Matthew Harmsen <mharmsen@redhat.com> | 2015-11-01 23:28:53 -0700 |
| commit | 54bbce097db9caaeeeda04bd547f2798221591ed (patch) | |
| tree | c9a08f54d532d01ee8b655e526659d9af01165ed /base/common/python/pki/cli.py | |
| parent | e35499a0d72b47e1418cfb6526c301b442c87155 (diff) | |
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)
Diffstat (limited to 'base/common/python/pki/cli.py')
| -rw-r--r-- | base/common/python/pki/cli.py | 7 |
1 files changed, 5 insertions, 2 deletions
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 |
