test-doctest: remove TERM env variable only if it's there
authorPatrick Mezard <pmezard@gmail.com>
Sat, 11 Oct 2008 16:40:59 +0200
changeset 7078 967adcf5910d
parent 7074 b1a4f67b98d0
child 7079 0b74409d5858
child 7178 98b6c3dde237
test-doctest: remove TERM env variable only if it's there
tests/test-doctest.py
--- a/tests/test-doctest.py	Fri Oct 10 11:36:02 2008 +0200
+++ b/tests/test-doctest.py	Sat Oct 11 16:40:59 2008 +0200
@@ -1,5 +1,7 @@
 # this is hack to make sure no escape characters are inserted into the output
-import os; del os.environ['TERM'] 
+import os;
+if 'TERM' in os.environ:
+    del os.environ['TERM'] 
 import doctest
 
 import mercurial.changelog