summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin
diff options
context:
space:
mode:
authorHolger Weiß <holger@zedat.fu-berlin.de>2011-07-06 00:53:39 +0200
committerHolger Weiß <holger@zedat.fu-berlin.de>2011-07-06 00:53:39 +0200
commit98373426272e97d1f034a76df5486dc8744ff8b9 (patch)
tree4a6c8788eec2c1fed0511bfffc3f135cfad74090 /src/lib/Server/Admin
parentb0639bb7effd411a28fd7950b11a1a5cbe43161e (diff)
downloadbcfg2-98373426272e97d1f034a76df5486dc8744ff8b9.tar.gz
bcfg2-98373426272e97d1f034a76df5486dc8744ff8b9.tar.bz2
bcfg2-98373426272e97d1f034a76df5486dc8744ff8b9.zip
bcfg2-admin compare: Another few print() cleanups
Indent all output in a consistent way.
Diffstat (limited to 'src/lib/Server/Admin')
-rw-r--r--src/lib/Server/Admin/Compare.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/Server/Admin/Compare.py b/src/lib/Server/Admin/Compare.py
index e6b273176..82d0d690c 100644
--- a/src/lib/Server/Admin/Compare.py
+++ b/src/lib/Server/Admin/Compare.py
@@ -38,12 +38,13 @@ class Compare(Bcfg2.Server.Admin.Mode):
for child in new.getchildren():
if child.tag not in self.important:
- print("Tag type %s not handled" % (child.tag))
+ print(" %s in (new) bundle %s:\n tag type not handled!" %
+ (child.tag, bundle))
continue
equiv = old.xpath('%s[@name="%s"]' %
(child.tag, child.get('name')))
if len(equiv) == 0:
- print(" %s %s in bundle %s:\n only in new configuration" %
+ print(" %s %s in bundle %s:\n only in new configuration" %
(child.tag, child.get('name'), bundle))
identical = False
continue
@@ -56,16 +57,17 @@ class Compare(Bcfg2.Server.Admin.Mode):
if attrdiff:
diff.append('attributes (%s)' % ', '.join(attrdiff))
if diff:
- print(" %s %s in bundle %s:\n %s differ" % (child.tag, \
+ print(" %s %s in bundle %s:\n %s differ" % (child.tag, \
child.get('name'), bundle, ' and '.join(diff)))
identical = False
for child in old.getchildren():
if child.tag not in self.important:
- print("Tag type %s not handled" % (child.tag))
+ print(" %s in (old) bundle %s:\n tag type not handled!" %
+ (child.tag, bundle))
elif len(new.xpath('%s[@name="%s"]' %
(child.tag, child.get('name')))) == 0:
- print(" %s %s in bundle %s:\n only in old configuration" %
+ print(" %s %s in bundle %s:\n only in old configuration" %
(child.tag, child.get('name'), bundle))
identical = False
@@ -93,13 +95,13 @@ class Compare(Bcfg2.Server.Admin.Mode):
for bundle in old.findall('./Bundle'):
if len(new.xpath('Bundle[@name="%s"]' % (bundle.get('name')))) == 0:
- print("Bundle %s only in old configuration" %
+ print(" Bundle %s only in old configuration" %
bundle.get('name'))
identical = False
for bundle in new.findall('./Bundle'):
equiv = old.xpath('Bundle[@name="%s"]' % (bundle.get('name')))
if len(equiv) == 0:
- print("Bundle %s only in new configuration" %
+ print(" Bundle %s only in new configuration" %
bundle.get('name'))
identical = False
elif not self.compareStructures(bundle, equiv[0]):