summaryrefslogtreecommitdiff
path: root/cloudinit/dhclient_hook.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2016-08-19 13:58:52 -0400
committerScott Moser <smoser@brickies.net>2016-08-22 12:58:33 -0400
commit685ffd49561bb92971f6b76e4690b86d7d6ecc0f (patch)
tree7f71a18d816476359435baeaa9334a95ffba1df1 /cloudinit/dhclient_hook.py
parent1f8b37e0d80534d2055ee2e888f5a7e36c4b98b4 (diff)
downloadvyos-cloud-init-685ffd49561bb92971f6b76e4690b86d7d6ecc0f.tar.gz
vyos-cloud-init-685ffd49561bb92971f6b76e4690b86d7d6ecc0f.zip
Minor cleanups to atomic_helper and add unit tests.
Change atomic_helper.write_file to have same same signature as write_file. Add some simple unit tests for atomic_helper.
Diffstat (limited to 'cloudinit/dhclient_hook.py')
-rw-r--r--cloudinit/dhclient_hook.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/dhclient_hook.py b/cloudinit/dhclient_hook.py
index 9dcbe39c..82cb1855 100644
--- a/cloudinit/dhclient_hook.py
+++ b/cloudinit/dhclient_hook.py
@@ -3,7 +3,7 @@
import os
-from cloudinit.atomic_helper import atomic_write_json
+from cloudinit import atomic_helper
from cloudinit import log as logging
from cloudinit import stages
@@ -46,5 +46,5 @@ class LogDhclient(object):
envs = os.environ
if self.hook_file is None:
return
- atomic_write_json(self.hook_file, self.get_vals(envs))
+ atomic_helper.write_json(self.hook_file, self.get_vals(envs))
LOG.debug("Wrote dhclient options in %s", self.hook_file)