changeset 40531:90517fad4293

contrib: tweak import-checker to always use bytes for module names We could go the other route and make embedded() return this as a bytes, but then it would be harder to portably doctest, so I prefer this option. Differential Revision: https://phab.mercurial-scm.org/D5206
author Augie Fackler <augie@google.com>
date Thu, 01 Nov 2018 15:58:01 -0400
parents 99d5424eedc8
children 07b87ee2ea75
files contrib/import-checker.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/import-checker.py	Thu Nov 01 15:43:43 2018 -0400
+++ b/contrib/import-checker.py	Thu Nov 01 15:58:01 2018 -0400
@@ -696,7 +696,7 @@
     if py or f.endswith('.t'):
         with open(f, 'rb') as src:
             for script, modname, t, line in embedded(f, modname, src):
-                yield script, modname, t, line
+                yield script, modname.encode('utf8'), t, line
 
 def main(argv):
     if len(argv) < 2 or (argv[1] == '-' and len(argv) > 2):