diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2024-02-25 17:40:19 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2024-07-08 10:12:07 -0700 |
commit | 815305b94864556c994934c7a7c830da7de1d94e (patch) | |
tree | 6d85f089b05520416eee1f51f80636b357cda73d /tools/genuuid | |
parent | 0b561c7304ec82807212bd070fc6a1684c67607b (diff) | |
download | fork-ledger-815305b94864556c994934c7a7c830da7de1d94e.tar.gz fork-ledger-815305b94864556c994934c7a7c830da7de1d94e.tar.bz2 fork-ledger-815305b94864556c994934c7a7c830da7de1d94e.zip |
Use Python raw strings for regex methods argument
Diffstat (limited to 'tools/genuuid')
-rwxr-xr-x | tools/genuuid | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/genuuid b/tools/genuuid index 0ad5bd92..784da6ac 100755 --- a/tools/genuuid +++ b/tools/genuuid @@ -8,15 +8,15 @@ def scan_path(path): try: with open(path, 'r') as fd: for line in fd: - match = re.match('\*', line) + match = re.match(r'\*', line) if match: bug = uuid = None - match = re.search('\[\[bug:([0-9]+)\]\[#[0-9]+\]\]', line) + match = re.search(r'\[\[bug:([0-9]+)\]\[#[0-9]+\]\]', line) if match: bug = match.group(1) elif bug: - match = re.search(':ID:\s+(.+?)\s*$', line) + match = re.search(r':ID:\s+(.+?)\s*$', line) if match: uuid = match.group(1) print(f"UPDATE bugs SET cf_uuid='{uuid}' WHERE bug_id={bug};") |