def _load(self, file_parser, section_name):
<EOL>log = logging.getLogger('<STR_LIT>')<EOL>try:<EOL><INDENT>log.debug("<STR_LIT>" + section_name<EOL>+ "<STR_LIT>" + self._name)<EOL>data = None<EOL>try:<EOL><INDENT>if self.e_type == int:<EOL><INDENT>data = file_parser.getint(section_name, self._name)<EOL><DEDENT>elif self.e_type == float:<EOL><INDENT>data = file_parser.getfloat(section_name, self._name)<EOL><DEDENT>elif self.e_type == bool:<EOL><INDENT>data = file_parser.getboolean(section_name, self._name)<EOL><DEDENT>elif self.e_type == list:<EOL><INDENT>data = file_parser.get(section_name, self._name)<EOL>data = data.strip()<EOL>data = data.decode(locale.getpreferredencoding())<EOL>data = data.split()<EOL>if not data:<EOL><INDENT>msg = "<STR_LIT>"name": self._name}<EOL>log.error(msg)<EOL>raise ValueError(msg)<EOL>elif self.e_type == str:<EOL>data = file_parser.get(section_name, self._name)<EOL>if not data:<EOL>msg = "<STR_LIT>" % {"<STR_LIT:name>": self._name}<EOL>log.error(msg)<EOL>raise ValueError(msg)<EOL>data = data.decode(locale.getpreferredencoding())<EOL>else:<EOL>msg = "<STR_LIT>" % {<EOL>"<STR_LIT:type>": self.e_type}<EOL>log.error(msg)<EOL>raise TypeError(msg)<EOL>except ValueError as ex:<EOL>msg = "<STR_LIT>" %  {<EOL><DEDENT><DEDENT>"<STR_LIT:name>": self._name,<EOL>"<STR_LIT>": self.e_type<EOL>}<EOL>log.error(msg)<EOL>log.error(str(ex))<EOL>raise ValueError(str(ex))<EOL>log_data = {"<STR_LIT:name>": self._name, "<STR_LIT:data>": data,<EOL><INDENT>"<STR_LIT>": self.e_type}<EOL>if self.hidden:<EOL>log_data['<STR_LIT:data>'] = "<STR_LIT>"<EOL>log.debug("<STR_LIT>", log_data)<EOL>self.value = data<EOL>except configparser.NoOptionError:<EOL>if self.conf_required:<EOL>msg = "<STR_LIT>" % {"<STR_LIT:name>": self._name}<EOL>log.error(msg)<EOL>raise ValueError(msg)<EOL>if self.default is not None:<EOL>self.value = self.default<EOL>log_data = {"<STR_LIT:name>": self._name, "<STR_LIT:data>": self.default,<EOL><INDENT>"<STR_LIT>": self.e_type}<EOL>if self.hidden:<EOL>log_data['<STR_LIT:data>'] = "<STR_LIT>"<EOL>log.debug("<STR_LIT>", log_data)<EOL>else:<EOL>log.debug("<STR_LIT>" + self._name + "<STR_LIT:'>")<EOL>
The current element is loaded from the configuration file,
        all constraints and requirements are checked.