From b419ae3065554cf778ad00c44c33416bb8ea1850 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 20 Jul 2012 13:47:46 -0400 Subject: made -B (skip bundle) mode work with -Q (bundle-quick mode) --- src/sbin/bcfg2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/sbin') diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index 4fbbef877..4c1514117 100755 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -57,8 +57,8 @@ class Client: self.logger = logging.getLogger('bcfg2') self.logger.debug(self.setup) if self.setup['bundle_quick']: - if self.setup['bundle'] == []: - self.logger.error("-Q option requires -b") + if not self.setup['bundle'] and not self.setup['skipbundle']: + self.logger.error("-Q option requires -b or -B") raise SystemExit(1) elif self.setup['remove']: self.logger.error("-Q option incompatible with -r") @@ -264,7 +264,10 @@ class Client: [newconfig.append(bundle) for bundle in self.config.getchildren() if (bundle.tag == 'Bundle' and - bundle.get('name') in self.setup['bundle'])] + ((self.setup['bundle'] and + bundle.get('name') in self.setup['bundle']) or + (self.setup['skipbundle'] and + bundle.get('name') not in self.setup['skipbundle'])))] self.config = newconfig self.tools = Bcfg2.Client.Frame.Frame(self.config, -- cgit v1.2.3-1-g7c22