diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-10-06 15:05:23 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-10-06 15:05:23 +0000 |
commit | adb6d042d4a8c73c39524dd5a2daa6ca7693ca55 (patch) | |
tree | d551886eeea0b45ec7afb2a4596faa4b09d2d10b /src/lib/Client/Toolset.py | |
parent | 8d71f5924ce977779353fe3c148424f1b2264e4d (diff) | |
download | bcfg2-adb6d042d4a8c73c39524dd5a2daa6ca7693ca55.tar.gz bcfg2-adb6d042d4a8c73c39524dd5a2daa6ca7693ca55.tar.bz2 bcfg2-adb6d042d4a8c73c39524dd5a2daa6ca7693ca55.zip |
don't include extra element if no extra config elements exist
(Logical change 1.334)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1366 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Toolset.py')
-rw-r--r-- | src/lib/Client/Toolset.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py index 922b06f96..804756e2b 100644 --- a/src/lib/Client/Toolset.py +++ b/src/lib/Client/Toolset.py @@ -168,9 +168,10 @@ class Toolset(object): mod = SubElement(stats, "Modified") for elm in self.modified: SubElement(mod, elm.tag, name=elm.get('name')) - extra = SubElement(stats, "Extra") - [SubElement(extra, "Service", name=svc) for svc in self.extra_services] - [SubElement(extra, "Package", name=pkg) for pkg in self.pkgwork['remove']] + if self.extra_services + self.pkgwork['remove']: + extra = SubElement(stats, "Extra") + [SubElement(extra, "Service", name=svc) for svc in self.extra_services] + [SubElement(extra, "Package", name=pkg) for pkg in self.pkgwork['remove']] return stats # the next two are dispatch functions |