Changeset 2d25c1c in mod_gnutls for test/mgstest
- Timestamp:
- Dec 28, 2019, 6:32:02 AM (14 months ago)
- Branches:
- asyncio, master, proxy-ticket
- Children:
- 079859e
- Parents:
- dd91d9c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/__init__.py
rdd91d9c r2d25c1c 54 54 fcntl.flock(lockfile, fcntl.LOCK_UN) 55 55 print(f'Unlocked {file}.', file=sys.stderr) 56 57 58 59 def first_line_match(regexp, file): 60 """Return the first match of the regular expression in file (by line), 61 or None. Technically applicable to any iterable containing 62 strings, not just files opened for reading. 63 """ 64 for line in file: 65 m = regexp.search(line) 66 if m: 67 return m 68 return None
Note: See TracChangeset
for help on using the changeset viewer.