summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardon <jjardon@gnome.org>2015-03-23 23:19:33 +0000
committerJavier Jardón <jjardon@gnome.org>2015-03-24 00:10:22 +0000
commit5f97098ec13521978233a7182668f7490519f74a (patch)
treeabc057a4e8ef4bd294c23d64f27a2e1a64aa4009
parent43ca2492036b8f38769674f34682e3a1cd14ffe9 (diff)
downloaddefinitions-5f97098ec13521978233a7182668f7490519f74a.tar.gz
simple-network: Use function to ensure directory path will exist
Change-Id: I44693d15aa5e92d5f09720065788adff34f8685c
-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']))