# Path: peekaboo/exceptions.py
# class PeekabooConfigException(PeekabooException):
#     pass
# 
# Path: peekaboo/toolbox/cortex.py
# class tlp(enum.Enum):
#     WHITE = 0
#     GREEN = 1
#     AMBER = 2
#     RED = 3


import re
import sys
import logging
import configparser
from peekaboo.exceptions import PeekabooConfigException
from peekaboo.toolbox.cortex import tlp
# General Public License for more details.                                    #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

""" The configuration for the main program as well as the ruleset. Handles
defaults as well as reading a configuration file. """




logger = logging.getLogger(__name__)

class PeekabooConfigParser( # pylint: disable=too-many-ancestors
        configparser.ConfigParser):
    """ A config parser that gives error feedback if a required file does not
    exist or cannot be opened. """
    LOG_LEVEL = object()
    OCTAL = object()
    RELIST = object()
    IRELIST = object()

    def __init__(self, config_file):
        super().__init__()

        try:
            self.read_file(open(config_file))
        except IOError as ioerror:

# Path: peekaboo/exceptions.py
# class PeekabooConfigException(PeekabooException):
#     pass
# 
# Path: peekaboo/toolbox/cortex.py
# class tlp(enum.Enum):
#     WHITE = 0
#     GREEN = 1
#     AMBER = 2
#     RED = 3


# Path: peekaboo/config.py
import re
import sys
import logging
import configparser
from peekaboo.exceptions import PeekabooConfigException
from peekaboo.toolbox.cortex import tlp

# General Public License for more details.                                    #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

""" The configuration for the main program as well as the ruleset. Handles
defaults as well as reading a configuration file. """




logger = logging.getLogger(__name__)

class PeekabooConfigParser( # pylint: disable=too-many-ancestors
        configparser.ConfigParser):
    """ A config parser that gives error feedback if a required file does not
    exist or cannot be opened. """
    LOG_LEVEL = object()
    OCTAL = object()
    RELIST = object()
    IRELIST = object()

    def __init__(self, config_file):
        super().__init__()

        try:
            self.read_file(open(config_file))
        except IOError as ioerror:

            raise PeekabooConfigException(