示例#1
0
    def checkArgs(self):
        """ check command line arguments """

        if not self.opts['type']:
            Wrapper.error('-t not given')

        return
示例#2
0
    def checkArgc(self):
        """ check command line argument count """

        if len(sys.argv) == 1:
            Wrapper.error('-H for help and usage')

        return
示例#3
0
    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