AETHER-3321 Refactor configuration code in enodebd
AETHER-3520 Make enodebd containerized
AETHER-3504 Geomap of Grafana with enodeb coordinate information
Change-Id: Ie425254fa1a8b286004d2bcd366cf6c7057c925c
diff --git a/enodeb_status.py b/enodeb_status.py
index 7f19f9b..f7f5b6f 100644
--- a/enodeb_status.py
+++ b/enodeb_status.py
@@ -469,9 +469,9 @@
) -> bool:
""" Returns '1' for true, and '0' for false """
stripped_value = str(param_value).lower().strip()
- if stripped_value in {'true', '1'}:
+ if stripped_value in {'true', '1', 'enabled'}:
return True
- elif stripped_value in {'false', '0'}:
+ elif stripped_value in {'false', '0', 'disabled', 'InProgress'}:
return False
else:
logger.warning(
@@ -490,7 +490,7 @@
# No translation to do.
return param
stripped_value = param.lower().strip()
- if stripped_value == '0' or stripped_value == '2':
+ if stripped_value in ['0', '2', 'inprogress']:
# 2 = GPS locking
return False
elif stripped_value == '1':
@@ -500,7 +500,7 @@
'GPS status parameter not understood (%s)', param,
)
return False
- except (KeyError, ConfigurationError):
+ except (KeyError, ConfigurationError, AttributeError):
return False