tests/printenv.py
changeset 16982 9c892c830a72
parent 16963 c19113e842d3
child 17018 e7fdfc702d9f
--- a/tests/printenv.py	Mon Jun 18 23:28:56 2012 +0200
+++ b/tests/printenv.py	Sun Jun 17 00:27:31 2012 +0200
@@ -37,10 +37,12 @@
 env.sort()
 
 out.write("%s hook: " % name)
-for k, v in env:
-    if os.name == 'nt':
-        v = v.replace('\\', '/')
-    out.write("%s=%s " % (k, v))
+if os.name == 'nt':
+    filter = lambda x: x.replace('\\', '/')
+else:
+    filter = lambda x: x
+vars = ["%s=%s" % (k, filter(v)) for k, v in env]
+out.write(" ".join(vars))
 out.write("\n")
 out.close()