Skip to content
Snippets Groups Projects
Commit a1def6db authored by Robert Latta's avatar Robert Latta
Browse files

replaced old string formatting with fstrings

parent 54d5f0e3
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ def after_request(resp):
def related_interfaces(hostname, interface):
r = common.get_current_redis()
prefix = 'netconf-interfaces:%s:' % hostname
prefix = f'netconf-interfaces:{hostname}:'
for k in r.keys(prefix + interface + '.*'):
k = k.decode('utf-8')
assert k.startswith(prefix) # sanity
......@@ -263,7 +263,7 @@ def ix_peering_info(peer_info):
address = ipaddress.ip_address(peer_info['name'])
except ValueError:
raise ClassifierProcessingError(
'unable to parse %r as an ip address' % address)
f'unable to parse {address} as an ip address')
description = peer_info['description']
assert description is not None # sanity
......@@ -373,7 +373,7 @@ def peer_info(address):
result['ix-public-peer-info'] = ix_peering_info(info)
result['locations'] += _location_from_equipment(info['router'])
info = r.get('vpn_rr_peer:%s' % address)
info = r.get(f'vpn_rr_peer:{address}')
if info:
info = info.decode('utf-8')
info = json.loads(info)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment