tests/printenv.py
changeset 4643 a39cec1d5cb8
parent 4285 4fd6f7e60894
child 4659 7a7d4937272b
--- a/tests/printenv.py	Wed Jun 20 22:05:43 2007 +0200
+++ b/tests/printenv.py	Wed Jun 20 22:06:37 2007 +0200
@@ -25,7 +25,10 @@
     if len(sys.argv) > 3:
         out = open(sys.argv[3], "ab")
 
-env = [v for v in os.environ if v.startswith("HG_")]
+# variables with empty values may not exist on all platforms, filter
+# them now for portability sake.
+env = [k for k,v in os.environ.iteritems() 
+       if k.startswith("HG_") and v]
 env.sort()
 
 # edit the variable part of the variable