def getInstallMode(): """ get installation mode """ count = 0 answer = '' while answer not in ('1', '2', '3'): if count >= 1: Wrapper.warn('incorrect mode\n') Wrapper.info('installation modes:') Wrapper.info('1. install from live-iso', verbose=True) Wrapper.info('2. install from repository', verbose=True) Wrapper.info('3. install from sources using blackman', verbose=True) answer = Wrapper.ask('select mode: ') count += 1 return answer
def checkInstallType(self): """ check chosen installation type or list available types """ types = ['text', 'curses'] if self.opts['type'] == '?': Wrapper.info('supported installation types', color='normal') Wrapper.info('text', color='normal', verbose=True) Wrapper.info('curses', color='normal', verbose=True) sys.exit(SUCCESS) if self.opts['type'] not in types: Wrapper.error('unknown installation type: ' + self.opts['type']) return