dvr_enabled: Avoid KeyError when Neutron not present

This commit is contained in:
Frode Nordahl
2022-04-22 09:19:49 +02:00
parent 7984d783fa
commit 7a192e56c9
+4 -1
View File
@@ -650,7 +650,10 @@ def dvr_enabled():
:returns: True when DVR is enabled, False otherwise
:rtype: bool
"""
return get_application_config_option('neutron-api', 'enable-dvr')
try:
return get_application_config_option('neutron-api', 'enable-dvr')
except KeyError:
return False
def ngw_present():