mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Create doc dir if unexistant
This commit is contained in:
parent
02224bcaab
commit
e3d077c32c
1 changed files with 4 additions and 1 deletions
|
@ -166,13 +166,16 @@ def main():
|
|||
})
|
||||
|
||||
|
||||
try: os.listdir(os.getcwd() +'/doc')
|
||||
except OSError: os.makedirs(os.getcwd() +'/doc')
|
||||
|
||||
for category, api_dict in resources.items():
|
||||
with open(os.getcwd() +'/doc/'+ category +'.json', 'w') as f:
|
||||
json.dump(api_dict, f)
|
||||
|
||||
with open(os.getcwd() +'/doc/resources.json', 'w') as f:
|
||||
json.dump(resource_list, f)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
Loading…
Add table
Reference in a new issue