Commit c7fef0ff authored by Jelte Jansen's avatar Jelte Jansen
Browse files

fixed a potential KeyError exception, and an import in the .py.in


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1279 e5f2f494-b856-4b98-b285-d166d9295462
parent 299437c4
......@@ -3,6 +3,7 @@
import sys; sys.path.append ('@@PYTHONPATH@@')
from isc.config.cfgmgr import ConfigManager
from isc.cc import SessionError
import signal
import os
......@@ -30,7 +31,7 @@ if __name__ == "__main__":
cm.read_config()
cm.notify_boss()
cm.run()
except isc.cc.SessionError as se:
except SessionError as se:
print("[b10-cfgmgr] Error creating config manager, "
"is the command channel daemon running?")
except KeyboardInterrupt as kie:
......
......@@ -267,7 +267,7 @@ class ConfigManager:
got_error = False
err_list = []
for module in self.config.data:
if module != "version" and self.config.data[module] != old_data[module]:
if module != "version" and (module not in old_data or self.config.data[module] != old_data[module]):
update_cmd = isc.config.ccsession.create_command(isc.config.ccsession.COMMAND_CONFIG_UPDATE, self.config.data[module])
print("[XX] send update: " + str(update_cmd))
print("[XX] to: " + str(module))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment