From 2bbb58ca21e84aa157393a58d35bc6ec08fedcea Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 5 Aug 2008 17:43:08 +0000 Subject: Improve interactive mode entry selection for __important__ entries (another patch from f.pauget) (Resolves Ticket #590) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4856 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Frame.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/Client/Frame.py') diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py index 24fbc52bf..a54760b12 100644 --- a/src/lib/Client/Frame.py +++ b/src/lib/Client/Frame.py @@ -77,14 +77,16 @@ class Frame: self.logger.info("Loaded tool drivers:") self.logger.info([tool.__name__ for tool in self.tools]) - if not self.dryrun and not self.setup['interactive'] and \ - not self.setup['bundle']: + if not self.dryrun and not self.setup['bundle']: for cfile in [cfl for cfl in config.findall(".//ConfigFile") \ if cfl.get('name') in self.__important__]: tl= [t for t in self.tools if t.handlesEntry(cfile) \ and t.canVerify(cfile)] if tl: if not tl[0].VerifyConfigFile(cfile, []): + if self.setup['interactive'] and not \ + promptFilter("Install %s: %s? (y/N):", [cfile]): + continue try: self.states[cfile] = tl[0].InstallConfigFile(cfile) except: -- cgit v1.2.3-1-g7c22