diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-05-20 04:06:17 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-05-20 04:18:13 +0200 |
commit | 62841380c6400023cf973e273ab974352885fabd (patch) | |
tree | 92f1880ed2f5a2e4604d3bcc85baac0f410870da /base/common/python | |
parent | f30be692453ccb323f874e5a751e2381cbb4ebb0 (diff) | |
download | pki-62841380c6400023cf973e273ab974352885fabd.tar.gz pki-62841380c6400023cf973e273ab974352885fabd.tar.xz pki-62841380c6400023cf973e273ab974352885fabd.zip |
Fixed problem with --ignore-banner option.
The pki CLI has been modified to parse the --ignore-banner option
properly and pass it only to Java-based CLI commands.
https://pagure.io/dogtagpki/issue/2683
Change-Id: Ifc3e98f74682a2fb4daeea16e86f495515a2d1f5
Diffstat (limited to 'base/common/python')
-rw-r--r-- | base/common/python/pki/cli/main.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/common/python/pki/cli/main.py b/base/common/python/pki/cli/main.py index 268547bfc..f201c1d70 100644 --- a/base/common/python/pki/cli/main.py +++ b/base/common/python/pki/cli/main.py @@ -44,6 +44,7 @@ class PKICLI(pki.cli.CLI): self.password = None self.password_file = None self.token = None + self.ignore_banner = False self.add_module(pki.cli.pkcs12.PKCS12CLI()) @@ -96,6 +97,9 @@ class PKICLI(pki.cli.CLI): if self.token and self.token != 'internal': cmd.extend(['--token', self.token]) + if self.ignore_banner: + cmd.extend(['--ignore-banner']) + if self.verbose: cmd.extend(['--verbose']) @@ -157,6 +161,12 @@ class PKICLI(pki.cli.CLI): pki_options.append(args[i + 1]) i = i + 2 + # check ignore banner option + elif args[i] == '--ignore-banner': + self.ignore_banner = True + pki_options.append(args[i]) + i = i + 1 + # check verbose option elif args[i] == '-v' or args[i] == '--verbose': self.set_verbose(True) |