changeset 41033:c0865f3da285

py3: byteify sys.argv in gendoc.py
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 20 Dec 2018 18:12:29 -0500
parents b2de94e59702
children b53c5651fcf6
files doc/gendoc.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/doc/gendoc.py	Tue Dec 18 09:34:32 2018 -0800
+++ b/doc/gendoc.py	Thu Dec 20 18:12:29 2018 -0500
@@ -29,6 +29,7 @@
 util.datapath
 from mercurial import (
     commands,
+    encoding,
     extensions,
     help,
     minirst,
@@ -230,7 +231,7 @@
 if __name__ == "__main__":
     doc = b'hg.1.gendoc'
     if len(sys.argv) > 1:
-        doc = sys.argv[1]
+        doc = encoding.strtolocal(sys.argv[1])
 
     ui = uimod.ui.load()
     if doc == b'hg.1.gendoc':