comparison mercurial/config.py @ 31154:fd3f4bf9325e

config: load included config files in binary mode I guess we've been getting lucky that this works in Python 2. This fixes loading included config files in Python 3 (it used to fail on the "somebody set up us the BOM" check.)
author Augie Fackler <raf@durin42.com>
date Fri, 03 Mar 2017 13:28:24 -0500
parents 954002426f78
children 8266802f0fa4
comparison
equal deleted inserted replaced
31153:5cab44fd1257 31154:fd3f4bf9325e
167 167
168 raise error.ParseError(l.rstrip(), ("%s:%s" % (src, line))) 168 raise error.ParseError(l.rstrip(), ("%s:%s" % (src, line)))
169 169
170 def read(self, path, fp=None, sections=None, remap=None): 170 def read(self, path, fp=None, sections=None, remap=None):
171 if not fp: 171 if not fp:
172 fp = util.posixfile(path) 172 fp = util.posixfile(path, 'rb')
173 self.parse(path, fp.read(), sections, remap, self.read) 173 self.parse(path, fp.read(), sections, remap, self.read)