🐛 ssh_known_dupes: use raw string for regex
This commit is contained in:
parent
306778dfda
commit
609a252219
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue