Do not raise error if folder exists
This commit is contained in:
parent
62ab525219
commit
b006eda133
|
@ -33,7 +33,7 @@ class Risotto(Controller):
|
|||
raise Exception(_('Invalid source'))
|
||||
else:
|
||||
releases = {'1.0.0': {'distribution': 'stable'}}
|
||||
os.makedirs(os.path.join(get_config().get('source').get('root_path'), source_name))
|
||||
os.makedirs(os.path.join(get_config().get('source').get('root_path'), source_name), exist_ok=True)
|
||||
with open(os.path.join(get_config().get('source').get('root_path'), source_name, 'releases.yml'), 'w') as release_file:
|
||||
yaml.dump(releases, release_file)
|
||||
source_id = await risotto_context.connection.fetchval(source_upsert,
|
||||
|
|
Loading…
Reference in New Issue