##// END OF EJS Templates
py3: use bytes in tests/printenv.py...
Pulkit Goyal -
r38123:bacbe829 default
parent child Browse files
Show More
@@ -39,14 +39,15 b' env = [(k, v) for k, v in os.environ.ite'
39 if k.startswith("HG_") and v]
39 if k.startswith("HG_") and v]
40 env.sort()
40 env.sort()
41
41
42 out.write("%s hook: " % name)
42 out.write(b"%s hook: " % name.encode('ascii'))
43 if os.name == 'nt':
43 if os.name == 'nt':
44 filter = lambda x: x.replace('\\', '/')
44 filter = lambda x: x.replace('\\', '/')
45 else:
45 else:
46 filter = lambda x: x
46 filter = lambda x: x
47 vars = ["%s=%s" % (k, filter(v)) for k, v in env]
47 vars = [b"%s=%s" % (k.encode('ascii'), filter(v).encode('ascii'))
48 out.write(" ".join(vars))
48 for k, v in env]
49 out.write("\n")
49 out.write(b" ".join(vars))
50 out.write(b"\n")
50 out.close()
51 out.close()
51
52
52 sys.exit(exitcode)
53 sys.exit(exitcode)
General Comments 0
You need to be logged in to leave comments. Login now