# HG changeset patch # User Patrick Mezard # Date 1240767555 -7200 # Node ID ac9c4049fd2956c1e4706bd7aec5261ba4c70a38 # Parent bf795c34c63d85e59177305964c46ef04e36bfb3 hghave: handle Windows raising on popen() failure diff -r bf795c34c63d -r ac9c4049fd29 tests/hghave --- 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():