Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 30348:9df29b7c62cf
ui: explicitly open config files in binary mode
This has been working mostly accidentally, but now it works explicitly.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 09 Oct 2016 09:17:49 -0400 |
parents | 318a24b52eeb |
children | 39d13b8c101d |
comparison
equal
deleted
inserted
replaced
30347:494d5cec0b07 | 30348:9df29b7c62cf |
---|---|
174 return False | 174 return False |
175 | 175 |
176 def readconfig(self, filename, root=None, trust=False, | 176 def readconfig(self, filename, root=None, trust=False, |
177 sections=None, remap=None): | 177 sections=None, remap=None): |
178 try: | 178 try: |
179 fp = open(filename) | 179 fp = open(filename, u'rb') |
180 except IOError: | 180 except IOError: |
181 if not sections: # ignore unless we were looking for something | 181 if not sections: # ignore unless we were looking for something |
182 return | 182 return |
183 raise | 183 raise |
184 | 184 |