From 353003f6eecb08b3b19147f22775370d41d7813c Mon Sep 17 00:00:00 2001 From: noaOrMlnx <58519608+noaOrMlnx@users.noreply.github.com> Date: Mon, 14 Sep 2020 21:28:24 +0300 Subject: [PATCH] Change update_feature_state call to pass False as default if feature has no 'has_timer' field (#5260) * Pass False as default if feature has no timer field * Update hostcfgd to fit the new changes merged New changes can be found in PR:5248 --- files/image_config/hostcfgd/hostcfgd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/image_config/hostcfgd/hostcfgd b/files/image_config/hostcfgd/hostcfgd index acfc3d0c80..2c66598e35 100755 --- a/files/image_config/hostcfgd/hostcfgd +++ b/files/image_config/hostcfgd/hostcfgd @@ -292,7 +292,7 @@ class HostConfigDaemon: syslog.syslog(syslog.LOG_WARNING, "Eanble state of feature '{}' is None".format(feature_name)) continue - update_feature_state(feature_name, state, feature_table[feature_name]['has_timer']) + update_feature_state(feature_name, state, feature_table[feature_name].get('has_timer', 'False')) def aaa_handler(self, key, data): self.aaacfg.aaa_update(key, data) @@ -334,7 +334,7 @@ class HostConfigDaemon: syslog.syslog(syslog.LOG_WARNING, "Enable state of feature '{}' is None".format(feature_name)) return - update_feature_state(feature_name, state, feature_table[feature_name]['has_timer']) + update_feature_state(feature_name, state, feature_table[feature_name].get('has_timer', 'False')) def start(self): # Update all feature states once upon starting