Commit 55dfb8ee by Sébastien Eustace

Fix config command not creating config files

parent a8f6a72d
# Change Log # Change Log
## [Unreleased]
### Fixed
- Fixed config files not being created.
## [0.8.5] - 2018-04-19 ## [0.8.5] - 2018-04-19
### Fixed ### Fixed
......
...@@ -49,12 +49,12 @@ To remove a repository (repo is a short alias for repositories): ...@@ -49,12 +49,12 @@ To remove a repository (repo is a short alias for repositories):
# Create config file if it does not exist # Create config file if it does not exist
if not self._config.file.exists(): if not self._config.file.exists():
self._config.file.parent.mkdir(parents=True, exist_ok=True) self._config.file.parent.mkdir(parents=True, exist_ok=True)
with self._config.file.open() as f: with self._config.file.open('w') as f:
f.write(TEMPLATE) f.write(TEMPLATE)
if not self._auth_config.file.exists(): if not self._auth_config.file.exists():
self._auth_config.file.parent.mkdir(parents=True, exist_ok=True) self._auth_config.file.parent.mkdir(parents=True, exist_ok=True)
with self._auth_config.file.open() as f: with self._auth_config.file.open('w') as f:
f.write(AUTH_TEMPLATE) f.write(AUTH_TEMPLATE)
def handle(self): def handle(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment