[bgpcfgd]: Fix bgpcfgd. Don't notify before all deps are ready. (#4027)

* Fix bgpcfgd error. Previously subscribers were notified before all dependencies were ready
This commit is contained in:
pavel-shirshov 2020-01-17 14:04:14 -08:00 committed by lguohan
parent 64500e143b
commit 05d61b5ed5

View File

@ -203,6 +203,8 @@ class Manager(object):
syslog.syslog(syslog.LOG_ERR, 'Invalid operation "%s" for key "%s"' % (op, key)) syslog.syslog(syslog.LOG_ERR, 'Invalid operation "%s" for key "%s"' % (op, key))
def on_deps_change(self): def on_deps_change(self):
if not self.directory.available_deps(self.deps):
return
new_queue = [] new_queue = []
for key, data in self.set_queue: for key, data in self.set_queue:
res = self.set_handler(key, data) res = self.set_handler(key, data)