Exemplo n.º 1
0
 def test_get_command(self):
     ClientConfig().load('/etc/yumtools.conf')
     self.assertTrue(
         isinstance(commands.getCommand("help"), helpcommand.HelpCommand))
     self.assertTrue(
         isinstance(
             commands.getCommand("upload"), uploadcommand.UploadCommand))
Exemplo n.º 2
0
 def test_get_command(self):
     ClientConfig().load('/etc/yumtools.conf')
     self.assertTrue(
         isinstance(commands.getCommand("help"), helpcommand.HelpCommand))
     self.assertTrue(
         isinstance(commands.getCommand("upload"),
                    uploadcommand.UploadCommand))
Exemplo n.º 3
0
 def run(self, options, args):
     if not self._checkArgs(args):
         return error.ERROR_COMMAND_PARM_INVALID
     command = getCommand(args[0])
     if command is None:
         io.error('', 'command %s not supported.' % args[0])
         return error.ERROR_UNSUPPORT_COMMAND
     command.showHelp()
     return error.ERROR_SUCCEED
Exemplo n.º 4
0
 def run(self, options, args):
     if not self._checkArgs(args):
         return error.ERROR_COMMAND_PARM_INVALID
     command = getCommand(args[0])
     if command is None:
         io.error('', 'command %s not supported.' % args[0])
         return error.ERROR_UNSUPPORT_COMMAND
     command.showHelp()
     return error.ERROR_SUCCEED