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
commit500943a125a1b21c08adcc400a86569693aebfa4 (patch)
treeabc057a4e8ef4bd294c23d64f27a2e1a64aa4009
parentda48a28de7461bd46ef777a2ab2f5ca0e5c1185c (diff)
downloaddefinitions-500943a125a1b21c08adcc400a86569693aebfa4.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']))