# HG changeset patch # User Matt Harbison # Date 1537329398 14400 # Node ID fe28267d522349c4642e32c1a7a06dada8515cad # Parent 5abc47d4ca6bc3f4fc9de93d184b282481b4b2b2 py3: byteify contrib/check-config.py The corresponding *.t still fails because of bytes (with a 'b' prefix) vs str printing, but no longer crashes. # skip-blame for b'' prefixing diff -r 5abc47d4ca6b -r fe28267d5223 contrib/check-config.py --- a/contrib/check-config.py Tue Sep 18 23:47:21 2018 -0400 +++ b/contrib/check-config.py Tue Sep 18 23:56:38 2018 -0400 @@ -104,12 +104,12 @@ ctype = m.group('ctype') if not ctype: ctype = 'str' - name = m.group('section') + "." + m.group('option') + name = m.group('section') + b"." + m.group('option') default = m.group('default') if default in (None, 'False', 'None', '0', '[]', '""', "''"): - default = '' + default = b'' if re.match(b'[a-z.]+$', default): - default = '' + default = b'' if (name in foundopts and (ctype, default) != foundopts[name] and name not in allowinconsistent): print(l.rstrip()) @@ -117,19 +117,19 @@ foundopts[name])) print("at %s:%d:" % (f, linenum)) foundopts[name] = (ctype, default) - carryover = '' + carryover = b'' else: m = re.search(configpartialre, line) if m: carryover = line else: - carryover = '' + carryover = b'' for name in sorted(foundopts): if name not in documented: - if not (name.startswith("devel.") or - name.startswith("experimental.") or - name.startswith("debug.")): + if not (name.startswith(b"devel.") or + name.startswith(b"experimental.") or + name.startswith(b"debug.")): ctype, default = foundopts[name] if default: default = ' [%s]' % default