mercurial/config.py
branchstable
changeset 43346 6ada8a274b9c
parent 43276 d201a637c971
child 43506 9f70512ae2cf
--- a/mercurial/config.py	Sun Oct 27 20:16:59 2019 +0100
+++ b/mercurial/config.py	Tue Oct 29 10:41:30 2019 +0100
@@ -212,11 +212,9 @@
     def read(self, path, fp=None, sections=None, remap=None):
         if not fp:
             fp = util.posixfile(path, b'rb')
-        assert (
-            getattr(fp, 'mode', r'rb') == r'rb'
-        ), b'config files must be opened in binary mode, got fp=%r mode=%r' % (
-            fp,
-            fp.mode,
+        assert getattr(fp, 'mode', r'rb') == r'rb', (
+            b'config files must be opened in binary mode, got fp=%r mode=%r'
+            % (fp, fp.mode,)
         )
         self.parse(
             path, fp.read(), sections=sections, remap=remap, include=self.read