changeset 7078:967adcf5910d

test-doctest: remove TERM env variable only if it's there
author Patrick Mezard <pmezard@gmail.com>
date Sat, 11 Oct 2008 16:40:59 +0200
parents b1a4f67b98d0
children 0b74409d5858 98b6c3dde237
files tests/test-doctest.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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