From da985b7795c068d881e86653af9995ad4f13672f Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Mon, 29 Sep 2025 21:49:37 +0200 Subject: [PATCH] set raw str for regex l13 --- check-snapshot-age | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-snapshot-age b/check-snapshot-age index 664d2c5..4b60922 100644 --- a/check-snapshot-age +++ b/check-snapshot-age @@ -10,7 +10,7 @@ _snapshots = subprocess.check_output("/usr/sbin/zfs list -t snapshot -Hpo name,c LABELS=("frequent","hourly","daily","weekly","monthly","yearly","backup-zfs","bashclub-zfs") RE_LABELSEARCH = re.compile("|".join(LABELS)) _datasets = {} -for _datastore,_snapshot,_creation in re.findall("^([\w_./-]+)@([\w_.-]+)\t(\d+)",_snapshots.decode('utf-8'),re.M): +for _datastore,_snapshot,_creation in re.findall(r"^([\w_./-]+)@([\w_.-]+)\t(\d+)",_snapshots.decode('utf-8'),re.M): if _datastore not in _datasets: _datasets[_datastore] = {} _label = RE_LABELSEARCH.search(_snapshot)