Fixed relative config loading with utf-8 names
This commit is contained in:
parent
1964d25e96
commit
a59c7c253c
@ -354,7 +354,7 @@ class ConfigurationGetter(object):
|
|||||||
for name in constants.CONFIG_NAMES:
|
for name in constants.CONFIG_NAMES:
|
||||||
path = location + os.path.sep + name
|
path = location + os.path.sep + name
|
||||||
if os.path.isfile(path) and (os.name == 'nt' or path != os.path.join(os.getenv('HOME', '.'), constants.DEFAULT_CONFIG_NAME_LINUX)):
|
if os.path.isfile(path) and (os.name == 'nt' or path != os.path.join(os.getenv('HOME', '.'), constants.DEFAULT_CONFIG_NAME_LINUX)):
|
||||||
loadedPaths.append("'" + os.path.normpath(path) + "'")
|
loadedPaths.append("'" + os.path.normpath(path).decode('utf-8') + "'")
|
||||||
self._parseConfigFile(path, createConfig=False)
|
self._parseConfigFile(path, createConfig=False)
|
||||||
self._checkConfig()
|
self._checkConfig()
|
||||||
return loadedPaths
|
return loadedPaths
|
||||||
@ -427,4 +427,4 @@ class SafeConfigParserUnicode(SafeConfigParser):
|
|||||||
if (value is not None) or (self._optcre == self.OPTCRE):
|
if (value is not None) or (self._optcre == self.OPTCRE):
|
||||||
key = " = ".join((key, unicode(value).replace('\n', '\n\t')))
|
key = " = ".join((key, unicode(value).replace('\n', '\n\t')))
|
||||||
fp.write("%s\n" % key)
|
fp.write("%s\n" % key)
|
||||||
fp.write("\n")
|
fp.write("\n")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user