summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-12-11 21:07:04 +0100
committerJan Pokorný <jpokorny@redhat.com>2014-12-11 22:41:15 +0100
commitbd2d29585cc1fe676c1076a3c33d8829bdaca8f0 (patch)
tree004880686d3a19e4560e2a9ceb020db6296725b4 /commands
parentfd4e0b44b69f3c35464461e135cf1586f7d6adfa (diff)
downloadclufter-bd2d29585cc1fe676c1076a3c33d8829bdaca8f0.tar.gz
clufter-bd2d29585cc1fe676c1076a3c33d8829bdaca8f0.tar.xz
clufter-bd2d29585cc1fe676c1076a3c33d8829bdaca8f0.zip
Integrate FancyOutput helper class
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'commands')
-rw-r--r--commands/ccs2pcs.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/commands/ccs2pcs.py b/commands/ccs2pcs.py
index bd71d7e..2025329 100644
--- a/commands/ccs2pcs.py
+++ b/commands/ccs2pcs.py
@@ -16,10 +16,15 @@ def _check_pacemaker_1_2(cmd_ctxt):
system_extra = cmd_ctxt.get('system_extra', 'UNKNOWN-DISTRO')
if not cluster_pcs_1_2(system, system_extra):
from sys import stderr
- print >>stderr, ("Resulting configuration will likely not be applicable"
- " to ``{0}'' system as it seems so outdated as far as"
- " Pacemaker not supporting validation schema v1.2"
- ).format(': '.join((system, system_extra)))
+ svc_output = cmd_ctxt.get('svc_output',
+ lambda s, **kwargs: stderr.write(s + '\n'))
+ svc_output("Resulting configuration will likely not be applicable to"
+ " ``{0}'' system as it seems so outdated as far as Pacemaker"
+ " not supporting validation schema v1.2"
+ .format(': '.join((system, system_extra))),
+ base="error",
+ urgent=True,
+ )
@Command.deco(('ccs2ccsflat',