diff --git a/nafuma/auxillary.py b/nafuma/auxillary.py index bf06f8e..45633c5 100644 --- a/nafuma/auxillary.py +++ b/nafuma/auxillary.py @@ -25,6 +25,10 @@ def save_options(options, path, ignore=None): options_copy[i] = 'Removed' + if not os.path.isdir(os.path.dirname(path)): + os.makedirs(os.path.dirname(path)) + + with open(path, 'w') as f: json.dump(options_copy,f, skipkeys=True, indent=4)