def _read_config(self, filename=None):
if filename:<EOL><INDENT>self._config_filename = filename<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>import appdirs<EOL><DEDENT>except ImportError:<EOL><INDENT>raise Exception("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>self._config_filename = appdirs.user_config_dir(_LIBRARY_NAME, "<STR_LIT>") + "<STR_LIT>"<EOL><DEDENT>if not self._config:<EOL><INDENT>self._config = configparser.ConfigParser()<EOL>self._config.optionxform = str<EOL>self._config.read(self._config_filename)<EOL><DEDENT>
Read the user configuration