def getPackagesToBuild(self): view.printListWithBullets(self.__sections) try: option = model.readInput('Enter the packages to build', range(0, len(self.__sections)), multiple=True) except: view.printQuit() raise ValueError('I Quit!') return option
def __call__(self, parser, namespace, values, option_string=None): listy = model.filesWithExtension(os.getcwd(), 'cfg'); #TODO Error checking with option to provide the cfg file directory view.printListWithBullets(listy) try: select = model.readInput('Enter which platform: ', range(0, len(listy))) except: view.printQuit() return setattr(namespace, self.dest, listy[select[0]])
def run(self): view.printListWithBullets(self.__sections) for section in self.__sections: try: self.handle.get(section, 'COMMAND') except: self.handle.set(section, 'COMMAND', self.globalcmd) envvars = self.globalcfg[:] items = self.handle.items(section) envvars.extend(items) rv = model.executeCommand(envvars)