コード例 #1
0
ファイル: derrick.py プロジェクト: ipaste/derrick
    def run(self):
        try:
            self.load()
        except Exception as e:
            # TODO add some exception handler
            Logger.error("Failed to load rigging or commands in disk,because of %s" % e)

        commands_doc = self.cm.get_commands_doc()
        arguments = docopt(commands_doc, help=False, version=DERRICK_VERSION)
        if DEBUG_MODE in arguments and arguments[DEBUG_MODE] == 1:
            Logger.set_debug_mode()

        command_context = self.init_commands_context(arguments=arguments)
        self.cm.run_commands(command_context)
コード例 #2
0
ファイル: derrick.py プロジェクト: zhaodan2000/derrick
    def run(self):
        try:
            self.load()
        except Exception as e:
            # TODO add some exception handler
            Logger.error(
                "Failed to load rigging or commands in disk,because of %s" % e)

        commands_doc = self.cm.get_commands_doc()
        arguments = docopt(commands_doc, help=False, version=DERRICK_VERSION)
        if DEBUG_MODE in arguments and arguments[DEBUG_MODE] == 1:
            Logger.set_debug_mode()

        command_context = self.init_commands_context(arguments=arguments)
        self.cm.run_commands(command_context)
コード例 #3
0
    def run(self):
        try:
            self.load()
        except Exception as e:
            # TODO add some exception handler
            Logger.error(
                "Failed to load rigging or commands in disk,because of %s" % e)

        commands_doc = self.cm.get_commands_doc()
        arguments = docopt(commands_doc, help=False, version=DERRICK_VERSION)
        if DEBUG_MODE in arguments and arguments[DEBUG_MODE] == 1:
            Logger.set_debug_mode()

        # if not config command and check record valid
        if arguments["config"] is False:
            if self.recorder.is_valid() is False:
                Logger.error("Your should run `derrick config` first")
                return

        command_context = self.init_commands_context(arguments=arguments)
        self.cm.run_commands(command_context)