MCPcopy Create free account
hub / github.com/Syncplay/syncplay / _parseConfigFile

Method _parseConfigFile

syncplay/ui/ConfigurationGetter.py:394–406  ·  view source on GitHub ↗
(self, iniPath, createConfig=True)

Source from the content-addressed store, hash-verified

392 return path
393
394 def _parseConfigFile(self, iniPath, createConfig=True):
395 parser = SafeConfigParserUnicode(strict=False)
396 if not os.path.isfile(iniPath):
397 if createConfig:
398 open(iniPath, 'w').close()
399 else:
400 return
401 parser.read_file(codecs.open(iniPath, "r", "utf_8_sig"))
402 for section, options in list(self._iniStructure.items()):
403 if parser.has_section(section):
404 for option in options:
405 if parser.has_option(section, option):
406 self._config[option] = parser.get(section, option)
407
408 def _checkConfig(self):
409 try:

Callers 3

getConfigurationMethod · 0.95
setConfigOptionMethod · 0.95

Calls 1

Tested by

no test coverage detected