From 609a2522195f1e918dd0fa30c366e484f4f3c772 Mon Sep 17 00:00:00 2001 From: neingeist Date: Thu, 8 Feb 2024 23:15:59 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20ssh=5Fknown=5Fdupes:=20use=20raw?= =?UTF-8?q?=20string=20for=20regex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ssh_known_dupes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh_known_dupes b/ssh_known_dupes index 6ad959f..5e2b905 100755 --- a/ssh_known_dupes +++ b/ssh_known_dupes @@ -13,7 +13,7 @@ hostnames_per_key = defaultdict(list) with open(os.path.expanduser('~/.ssh/known_hosts')) as f: for line in f: - m = re.match('(\S+)\s+(\S+\s+\S+)(.*)?', line) + m = re.match(r'(\S+)\s+(\S+\s+\S+)(.*)?', line) if m: (hostname, key, cruft) = m.groups() hostnames_per_key[key].append(hostname)