Example #1
0
    def __new__(cls, name, bases, attrs):
        # Extra hg commands
        commands = attrs.get('commands', { })

        for cmd_name, command in cls._default_commands.items() + commands.items():
            attrs[cmd_name] = cls._create_hg_command(command)

        return ServiceBase.__new__(cls, name, bases, attrs)
Example #2
0
    def __new__(cls, name, bases, attrs):
        # Extra git commands
        commands = attrs.get('commands', { })

        for cmd_name, command in cls._default_commands.items() + commands.items():
            attrs[cmd_name] = cls._create_git_command(command,
                                        ignore_exit_status=command in cls._ignore_exit_status)

        return ServiceBase.__new__(cls, name, bases, attrs)
Example #3
0
    def __new__(cls, name, bases, attrs):
        # Extra hg commands
        commands = attrs.get('commands', {})

        for cmd_name, command in cls._default_commands.items(
        ) + commands.items():
            attrs[cmd_name] = cls._create_hg_command(command)

        return ServiceBase.__new__(cls, name, bases, attrs)
Example #4
0
    def __new__(cls, name, bases, attrs):
        # Give this Django class management commands, based on the
        # commands dictionary
        commands = attrs.get('commands', { })

        # Default commands
        for cmd_name, command in cls._default_commands.items():
            attrs[cmd_name] = cls._create_task(cmd_name, command,
                                    one_only=(command not in cls._on_every_host))

        # Custom additional commands
        for cmd_name, command in commands.items():
            attrs[cmd_name] = cls._create_task(cmd_name, command)

        return ServiceBase.__new__(cls, name, bases, attrs)
Example #5
0
    def __new__(cls, name, bases, attrs):
        # Give this Django class management commands, based on the
        # commands dictionary
        commands = attrs.get('commands', { })

        # Default commands
        for cmd_name, command in cls._default_commands.items():
            attrs[cmd_name] = cls._create_task(cmd_name, command,
                                    one_only=(command not in cls._on_every_host))

        # Custom additional commands
        for cmd_name, command in commands.items():
            attrs[cmd_name] = cls._create_task(cmd_name, command)

        return ServiceBase.__new__(cls, name, bases, attrs)
Example #6
0
    def __new__(cls, name, bases, attrs):
        for cmd_name, command in cls._default_commands.items():
            attrs[cmd_name] = cls._create_git_command(command, ignore_exit_status=command in cls._ignore_exit_status)

        return ServiceBase.__new__(cls, name, bases, attrs)