summaryrefslogtreecommitdiffstats
path: root/base/server/python
diff options
context:
space:
mode:
authorAbhijeet Kasurde <akasurde@redhat.com>2016-07-01 10:31:32 +0530
committerEndi S. Dewata <edewata@redhat.com>2016-07-01 19:19:38 +0200
commitab8655ca693ddf5afc0579db42cfbea61e8fee89 (patch)
treeb51bfc86b55cb86a4a3a16e1045018bea37a8e02 /base/server/python
parenta646c1b6e67a5c4d105208254fa3288cdbd86c6e (diff)
downloadpki-ab8655ca693ddf5afc0579db42cfbea61e8fee89.tar.gz
pki-ab8655ca693ddf5afc0579db42cfbea61e8fee89.tar.xz
pki-ab8655ca693ddf5afc0579db42cfbea61e8fee89.zip
Updated notification message for TKS subsystem command
Partially fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1351295
Diffstat (limited to 'base/server/python')
-rw-r--r--base/server/python/pki/server/cli/tks.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/server/python/pki/server/cli/tks.py b/base/server/python/pki/server/cli/tks.py
index 0bcf748c3..2c4157a03 100644
--- a/base/server/python/pki/server/cli/tks.py
+++ b/base/server/python/pki/server/cli/tks.py
@@ -118,9 +118,16 @@ class TKSClonePrepareCLI(pki.cli.CLI):
sys.exit(1)
instance = pki.server.PKIInstance(instance_name)
+ if not instance.is_valid():
+ print('ERROR: Invalid instance %s.' % instance_name)
+ sys.exit(1)
+
instance.load()
subsystem = instance.get_subsystem('tks')
+ if not subsystem:
+ print("ERROR: No TKS subsystem in instance %s." % instance_name)
+ sys.exit(1)
tmpdir = tempfile.mkdtemp()