Function
_match_line_sequence
(data, start, end, lines)
Source from the content-addressed store, hash-verified
| 1217 | |
| 1218 | |
| 1219 | def _match_line_sequence(data, start, end, lines): |
| 1220 | if not lines: |
| 1221 | return start |
| 1222 | for index in xrange(start, end - len(lines) + 1): |
| 1223 | data_index = index |
| 1224 | for expected in lines: |
| 1225 | if not fnmatch.fnmatch(data[data_index], expected): |
| 1226 | break; |
| 1227 | data_index += 1 |
| 1228 | else: |
| 1229 | return data_index |
| 1230 | return -1 |
| 1231 | |
| 1232 | |
| 1233 | def _sleep(delay): |
Tested by
no test coverage detected