##// END OF EJS Templates
hghave: handle Windows raising on popen() failure
Patrick Mezard -
r8213:ac9c4049 default
parent child Browse files
Show More
@@ -18,7 +18,11 b' def matchoutput(cmd, regexp, ignorestatu'
18 r = re.compile(regexp)
18 r = re.compile(regexp)
19 fh = os.popen(cmd)
19 fh = os.popen(cmd)
20 s = fh.read()
20 s = fh.read()
21 ret = fh.close()
21 try:
22 ret = fh.close()
23 except IOError:
24 # Happen in Windows test environment
25 ret = 1
22 return (ignorestatus or ret is None) and r.search(s)
26 return (ignorestatus or ret is None) and r.search(s)
23
27
24 def has_baz():
28 def has_baz():
General Comments 0
You need to be logged in to leave comments. Login now