Skip to content

Commit

Permalink
Fixes #17573: Error in technique editor just after install: No such f…
Browse files Browse the repository at this point in the history
…ile or directory: '/var/rudder/configuration-repository/ncf/generic_methods.json'
  • Loading branch information
VinceMacBuche committed Jun 8, 2020
1 parent 70dc357 commit 552e8ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ncf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ def write_everything(path):

def write_all_methods(path):
methods = ncf.get_all_generic_methods_metadata()
with open('/var/rudder/configuration-repository/ncf/generic_methods.json', 'w') as outfile:

methodsFile = '/var/rudder/configuration-repository/ncf/generic_methods.json'
if not os.path.exists(os.path.dirname(methodsFile)):
os.makedirs(os.path.dirname(methodsFile))
with open(methodsFile, 'w') as outfile:
json.dump(methods["data"]["generic_methods"], outfile, indent=2)

def write_all_techniques(path, migrate_old):
Expand Down

0 comments on commit 552e8ee

Please sign in to comment.