summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-02-14 20:52:58 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-02-14 20:52:58 +0000
commit68d5e04cb23bb9720151790f406c694fb2de6ce3 (patch)
treef2ea14d9e328bae0adcbbbac7062f5e67f0d54f1 /src
parentf871440a8ad4405b6188e6bbae2f560f5e75a97a (diff)
downloadbcfg2-68d5e04cb23bb9720151790f406c694fb2de6ce3.tar.gz
bcfg2-68d5e04cb23bb9720151790f406c694fb2de6ce3.tar.bz2
bcfg2-68d5e04cb23bb9720151790f406c694fb2de6ce3.zip
make 2 way print conditionally
(Logical change 1.204) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@870 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Debian.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index 2537e7e45..57b78069a 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -134,12 +134,14 @@ class Debian(Toolset):
def HandleExtra(self):
'''Deal with extra configuration detected'''
- if self.setup['remove'] in ['all', 'packages']:
- self.CondPrint('verbose', "Removing packages: %s" % self.pkgwork['remove'])
- system("apt-get remove %s" % " ".join(self.pkgwork['remove']))
- else:
- self.CondPrint('verbose', "Need to remove packages: %s" % self.pkgwork['remove'])
- self.CondPrint('verbose', "Need to remove services: %s" % self.extra_services)
+ if len(self.pkgwork) > 0:
+ if self.setup['remove'] in ['all', 'packages']:
+ self.CondPrint('verbose', "Removing packages: %s" % self.pkgwork['remove'])
+ system("apt-get remove %s" % " ".join(self.pkgwork['remove']))
+ else:
+ self.CondPrint('verbose', "Need to remove packages: %s" % self.pkgwork['remove'])
+ if len(self.extra_packages) > 0:
+ self.CondPrint('verbose', "Need to remove services: %s" % self.extra_services)
def Install(self):
'''Correct detected misconfigurations'''