@staticmethod
def get_parser(parser_factory, file_path):
    """
        Gets parser for given file

        :param parser_factory:
        :param file_path: path to file to be parsed
        :type file_path: str
        :return: parser
        :rtype: SafeConfigParser
        """
    parser = parser_factory.create_parser()
    parser.optionxform = str
    parser.read(file_path)
    return parser
