summaryrefslogtreecommitdiff
path: root/tools/genuuid
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2024-02-25 17:40:19 +0100
committerJohn Wiegley <johnw@newartisans.com>2024-07-08 10:12:07 -0700
commit815305b94864556c994934c7a7c830da7de1d94e (patch)
tree6d85f089b05520416eee1f51f80636b357cda73d /tools/genuuid
parent0b561c7304ec82807212bd070fc6a1684c67607b (diff)
downloadfork-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-xtools/genuuid6
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};")