Executing pyroadmin --verbose config --create-config when the path doesn't exist exits with:
INFO:pyrosimple.scripts.pyroadmin.AdminTool:Creating pyrosimple config file '/home/flower/.config/pyrosimple/config.toml'
INFO:pyrosimple.scripts.pyroadmin.AdminTool:Total time: 0.009 seconds.
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.10/pyroadmin", line 8, in <module>
sys.exit(run())
File "/usr/lib/python3.10/site-packages/pyrosimple/scripts/pyroadmin.py", line 303, in run
AdminTool().run()
File "/usr/lib/python3.10/site-packages/pyrosimple/scripts/base.py", line 173, in run
self.mainloop()
File "/usr/lib/python3.10/site-packages/pyrosimple/scripts/pyroadmin.py", line 298, in mainloop
self.args.func()
File "/usr/lib/python3.10/site-packages/pyrosimple/scripts/pyroadmin.py", line 273, in config
self.create_config()
File "/usr/lib/python3.10/site-packages/pyrosimple/scripts/pyroadmin.py", line 248, in create_config
with config_path.open("wb") as fh:
File "/usr/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/flower/.config/pyrosimple/config.toml'
Is this expected behaviour or should --create-config check if ~/.config/pyrosimple exists?
Thanks for the heads up, the intention was to have it create the directories if they didn't exist. That probably changed when I refactored the configuration away from dynaconf.
Executing
pyroadmin --verbose config --create-config
when the path doesn't exist exits with:Is this expected behaviour or should
--create-config
check if~/.config/pyrosimple
exists?