Commit f2cf3abe authored by Michal Čihař's avatar Michal Čihař

Ensure we do not pass unicode strings to ConfigParser

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 9744c52c
......@@ -771,6 +771,8 @@ class HgRepository(Repository):
section, option = path.split('.', 1)
filename = os.path.join(self.path, '.hg', 'hgrc')
value = value.encode('utf-8')
section = section.encode('utf-8')
option = option.encode('utf-8')
config = ConfigParser.RawConfigParser()
config.read(filename)
if not config.has_section(section):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment