# Path: lib/core/data.py

# 
# Path: lib/core/common.py
# def getSafeExString(ex, encoding=None):
#     """
#     Safe way how to get the proper exception represtation as a string
#     (Note: errors to be avoided: 1) "%s" % Exception(u'\u0161') and 2) "%s" % str(Exception(u'\u0161'))
#     """
#     retVal = ex
# 
#     if getattr(ex, "message", None):
#         retVal = ex.message
#     elif getattr(ex, "msg", None):
#         retVal = ex.msg
# 
#     return getUnicode(retVal, encoding=encoding)


import ConfigParser
from lib.core.data import paths, logger
from lib.core.common import getSafeExString
#!/usr/bin/env python
#-*- coding:utf-8 -*-



class ConfigFileParser:
    @staticmethod
    def _get_option(section, option):
        try:
            cf = ConfigParser.ConfigParser()
            cf.read(paths.CONFIG_PATH)
            return cf.get(section=section, option=option)
        except ConfigParser.NoOptionError, e:
            logger.warning('Missing essential options, please check your config-file')

# Path: lib/core/data.py

# 
# Path: lib/core/common.py
# def getSafeExString(ex, encoding=None):
#     """
#     Safe way how to get the proper exception represtation as a string
#     (Note: errors to be avoided: 1) "%s" % Exception(u'\u0161') and 2) "%s" % str(Exception(u'\u0161'))
#     """
#     retVal = ex
# 
#     if getattr(ex, "message", None):
#         retVal = ex.message
#     elif getattr(ex, "msg", None):
#         retVal = ex.msg
# 
#     return getUnicode(retVal, encoding=encoding)


# Path: lib/utils/config.py
import ConfigParser
from lib.core.data import paths, logger
from lib.core.common import getSafeExString

#!/usr/bin/env python
#-*- coding:utf-8 -*-



class ConfigFileParser:
    @staticmethod
    def _get_option(section, option):
        try:
            cf = ConfigParser.ConfigParser()
            cf.read(paths.CONFIG_PATH)
            return cf.get(section=section, option=option)
        except ConfigParser.NoOptionError, e:
            logger.warning('Missing essential options, please check your config-file')

            logger.error(getSafeExString(e))