Correct some stuff

This commit is contained in:
2018-10-09 22:38:40 -04:00
parent ceb7b6b5cd
commit 25df845769
3 changed files with 29 additions and 8 deletions

View File

@ -14,7 +14,10 @@ import re
#
def get_zookeeper_key():
# Get the interface from environment (passed by dnsmasq)
interface = os.environ['DNSMASQ_INTERFACE']
try:
interface = os.environ['DNSMASQ_INTERFACE']
except:
exit(1)
# Get the ID of the interface (the digits)
network_vni = re.findall('\d+', interface)[0]
# Create the key