summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-25 13:34:12 +0000
committerGerrit Code Review <gerrit@baserock.org>2015-03-25 13:34:12 +0000
commit0ece4fccf15057312f22b7b55a76d42e04e54c14 (patch)
treeabc057a4e8ef4bd294c23d64f27a2e1a64aa4009
parent53a950fe67039e5c6eb2d948a9a7da096fd3f8b2 (diff)
parent5f97098ec13521978233a7182668f7490519f74a (diff)
downloaddefinitions-0ece4fccf15057312f22b7b55a76d42e04e54c14.tar.gz
Merge "simple-network: Use function to ensure directory path will exist"
-rwxr-xr-xsimple-network.configure2
1 files changed, 2 insertions, 0 deletions
diff --git a/simple-network.configure b/simple-network.configure
index b4988125..130b96c9 100755
--- a/simple-network.configure
+++ b/simple-network.configure
@@ -109,6 +109,7 @@ class SimpleNetworkConfigurationExtension(cliapp.Application):
iface_file = self.generate_iface_file(stanzas)
directory_path = os.path.join(args[0], "etc", "network")
+ self.make_sure_path_exists(directory_path)
file_path = os.path.join(directory_path, "interfaces")
with open(file_path, "w") as f:
f.write(iface_file)
@@ -152,6 +153,7 @@ class SimpleNetworkConfigurationExtension(cliapp.Application):
continue
directory_path = os.path.join(args[0], "etc", "systemd", "network")
+ self.make_sure_path_exists(directory_path)
file_path = os.path.join(directory_path,
"%s-%s.network" % (i, stanza['name']))