##// 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 39 if k.startswith("HG_") and v]
40 40 env.sort()
41 41
42 out.write("%s hook: " % name)
42 out.write(b"%s hook: " % name.encode('ascii'))
43 43 if os.name == 'nt':
44 44 filter = lambda x: x.replace('\\', '/')
45 45 else:
46 46 filter = lambda x: x
47 vars = ["%s=%s" % (k, filter(v)) for k, v in env]
48 out.write(" ".join(vars))
49 out.write("\n")
47 vars = [b"%s=%s" % (k.encode('ascii'), filter(v).encode('ascii'))
48 for k, v in env]
49 out.write(b" ".join(vars))
50 out.write(b"\n")
50 51 out.close()
51 52
52 53 sys.exit(exitcode)
General Comments 0
You need to be logged in to leave comments. Login now