🐛 ssh_known_dupes: use raw string for regex

master
neingeist 11 months ago
parent 306778dfda
commit 609a252219

@ -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)

Loading…
Cancel
Save