changeset 8213:ac9c4049fd29

hghave: handle Windows raising on popen() failure
author Patrick Mezard <pmezard@gmail.com>
date Sun, 26 Apr 2009 19:39:15 +0200
parents bf795c34c63d
children a2af1d92b913
files tests/hghave
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave	Sun Apr 26 19:26:22 2009 +0200
+++ b/tests/hghave	Sun Apr 26 19:39:15 2009 +0200
@@ -18,7 +18,11 @@
     r = re.compile(regexp)
     fh = os.popen(cmd)
     s = fh.read()
-    ret = fh.close()
+    try:
+        ret = fh.close()
+    except IOError:
+        # Happen in Windows test environment
+        ret = 1
     return (ignorestatus or ret is None) and r.search(s)
 
 def has_baz():