equal
deleted
inserted
replaced
16 is matched by the supplied regular expression. |
16 is matched by the supplied regular expression. |
17 """ |
17 """ |
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(): |
25 return matchoutput('baz --version 2>&1', r'baz Bazaar version') |
29 return matchoutput('baz --version 2>&1', r'baz Bazaar version') |
26 |
30 |