Lint: W605 invalid escape sequence '\d'

This is the only one where forcing an `r` type to the string was
required; the remainder of W605 were replaced with character class
enclosures.
This commit is contained in:
Joshua Boniface 2020-11-07 12:22:20 -05:00
parent 7aaca92cdb
commit 27c6ac2b66
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ def get_zookeeper_key():
print('ERROR: DNSMASQ_BRIDGE_INTERFACE environment variable not found: {}'.format(e), file=sys.stderr) print('ERROR: DNSMASQ_BRIDGE_INTERFACE environment variable not found: {}'.format(e), file=sys.stderr)
exit(1) exit(1)
# Get the ID of the interface (the digits) # Get the ID of the interface (the digits)
network_vni = re.findall('\d+', interface)[0] network_vni = re.findall(r'\d+', interface)[0]
# Create the key # Create the key
zookeeper_key = '/networks/{}/dhcp4_leases'.format(network_vni) zookeeper_key = '/networks/{}/dhcp4_leases'.format(network_vni)
return zookeeper_key return zookeeper_key