import logging

from src.interface.mumjolandia.mumjolandia_response_object import MumjolandiaResponseObject
from src.interface.mumjolandia.mumjolandia_return_value import MumjolandiaReturnValue


class MumjolandiaSupervisor:
    def __init__(self):
        self.command_parsers = {}
        self.__init()

    def execute(self, command):
        try:
            logging.debug(self.__class__.__name__ + ' - parsing command: ' + str(command.arguments))
            return self.command_parsers[command.arguments[0]](command.arguments[1:])
        except KeyError:        # command parser doesn't exist
            return self.command_parsers['unrecognized_command'](command.arguments)
        except IndexError:
            return self.command_parsers['null'](command.arguments)
        except AttributeError:  # command == None
            return self.command_parsers['null']('')

    def __init(self):
        self.command_parsers['null'] = self.__command_null
        self.command_parsers['unrecognized_command'] = self.__unrecognized_command

    def __unrecognized_command(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.mumjolandia_unrecognized_parameters,
                                         arguments=args)

    def __command_null(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.mumjolandia_unrecognized_parameters,
                                         arguments=args)

2ddce13f6da7917e0f3389a74261cb08a2ecc554
<mask token>


class MumjolandiaSupervisor:

    def __init__(self):
        self.command_parsers = {}
        self.__init()

    def execute(self, command):
        try:
            logging.debug(self.__class__.__name__ + ' - parsing command: ' +
                str(command.arguments))
            return self.command_parsers[command.arguments[0]](command.
                arguments[1:])
        except KeyError:
            return self.command_parsers['unrecognized_command'](command.
                arguments)
        except IndexError:
            return self.command_parsers['null'](command.arguments)
        except AttributeError:
            return self.command_parsers['null']('')

    def __init(self):
        self.command_parsers['null'] = self.__command_null
        self.command_parsers['unrecognized_command'
            ] = self.__unrecognized_command
    <mask token>
    <mask token>

<mask token>


class MumjolandiaSupervisor:

    def __init__(self):
        self.command_parsers = {}
        self.__init()

    def execute(self, command):
        try:
            logging.debug(self.__class__.__name__ + ' - parsing command: ' +
                str(command.arguments))
            return self.command_parsers[command.arguments[0]](command.
                arguments[1:])
        except KeyError:
            return self.command_parsers['unrecognized_command'](command.
                arguments)
        except IndexError:
            return self.command_parsers['null'](command.arguments)
        except AttributeError:
            return self.command_parsers['null']('')

    def __init(self):
        self.command_parsers['null'] = self.__command_null
        self.command_parsers['unrecognized_command'
            ] = self.__unrecognized_command

    def __unrecognized_command(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.
            mumjolandia_unrecognized_parameters, arguments=args)
    <mask token>

<mask token>


class MumjolandiaSupervisor:

    def __init__(self):
        self.command_parsers = {}
        self.__init()

    def execute(self, command):
        try:
            logging.debug(self.__class__.__name__ + ' - parsing command: ' +
                str(command.arguments))
            return self.command_parsers[command.arguments[0]](command.
                arguments[1:])
        except KeyError:
            return self.command_parsers['unrecognized_command'](command.
                arguments)
        except IndexError:
            return self.command_parsers['null'](command.arguments)
        except AttributeError:
            return self.command_parsers['null']('')

    def __init(self):
        self.command_parsers['null'] = self.__command_null
        self.command_parsers['unrecognized_command'
            ] = self.__unrecognized_command

    def __unrecognized_command(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.
            mumjolandia_unrecognized_parameters, arguments=args)

    def __command_null(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.
            mumjolandia_unrecognized_parameters, arguments=args)

import logging
from src.interface.mumjolandia.mumjolandia_response_object import MumjolandiaResponseObject
from src.interface.mumjolandia.mumjolandia_return_value import MumjolandiaReturnValue


class MumjolandiaSupervisor:

    def __init__(self):
        self.command_parsers = {}
        self.__init()

    def execute(self, command):
        try:
            logging.debug(self.__class__.__name__ + ' - parsing command: ' +
                str(command.arguments))
            return self.command_parsers[command.arguments[0]](command.
                arguments[1:])
        except KeyError:
            return self.command_parsers['unrecognized_command'](command.
                arguments)
        except IndexError:
            return self.command_parsers['null'](command.arguments)
        except AttributeError:
            return self.command_parsers['null']('')

    def __init(self):
        self.command_parsers['null'] = self.__command_null
        self.command_parsers['unrecognized_command'
            ] = self.__unrecognized_command

    def __unrecognized_command(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.
            mumjolandia_unrecognized_parameters, arguments=args)

    def __command_null(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.
            mumjolandia_unrecognized_parameters, arguments=args)

import logging

from src.interface.mumjolandia.mumjolandia_response_object import MumjolandiaResponseObject
from src.interface.mumjolandia.mumjolandia_return_value import MumjolandiaReturnValue


class MumjolandiaSupervisor:
    def __init__(self):
        self.command_parsers = {}
        self.__init()

    def execute(self, command):
        try:
            logging.debug(self.__class__.__name__ + ' - parsing command: ' + str(command.arguments))
            return self.command_parsers[command.arguments[0]](command.arguments[1:])
        except KeyError:        # command parser doesn't exist
            return self.command_parsers['unrecognized_command'](command.arguments)
        except IndexError:
            return self.command_parsers['null'](command.arguments)
        except AttributeError:  # command == None
            return self.command_parsers['null']('')

    def __init(self):
        self.command_parsers['null'] = self.__command_null
        self.command_parsers['unrecognized_command'] = self.__unrecognized_command

    def __unrecognized_command(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.mumjolandia_unrecognized_parameters,
                                         arguments=args)

    def __command_null(self, args):
        return MumjolandiaResponseObject(status=MumjolandiaReturnValue.mumjolandia_unrecognized_parameters,
                                         arguments=args)
