From 3458ba2623dcc065d6e75125668233bc4fada149 Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Thu, 15 Jan 2015 16:59:12 -0500 Subject: combox/config.py: node directories are created if they're not already created. --- combox/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/combox/config.py b/combox/config.py index 4c17184..387c3af 100644 --- a/combox/config.py +++ b/combox/config.py @@ -88,6 +88,10 @@ def config_cb(config_dir = path.join(os.getenv('HOME'),'.combox/'), nodes[node_name]['size'] = input_func('node %d size (in mega bytes)' % i) nodes[node_name]['available'] = nodes[node_name]['size'] + # create node path, if it doesn't exists yet. + if not path.exists(nodes[node_name]['path']): + os.mkdir(nodes[node_name]['path']) + config_info['nodes_info'] = nodes config_file = open(config_file_path, 'w') yaml.dump(config_info, config_file, default_flow_style=False) -- cgit v1.2.3