Closed petterreinholdtsen closed 8 years ago
So there are 2 issues with this 1) There is an error in the newly introduced saveConfiguration() method https://github.com/petterreinholdtsen/creepy/commit/6751ee50bd20423db531f818c8f8ac3201564649#diff-e274be06ee3ac274db4677e3ce9746a8R158 should be
for l in self.config[c].keys():
2) Plugins need to call
self.saveConfiguration(self.config)
instead of
self.config.write()
because the latter does not take care of creating the config files in the user's $HOME/.creepy/plugin_name in advance, as the former does. Seems to be working now, I will merge the request with my modifications
Even better, can you modify your pull request to take care of 1) , so I can accept it as is ? Then I will push the changes needed in the plugins.
I have fixed 1) and pushed a replacement commit.
Creepy is currently designed to run from the source directory and save its plugin configuration in the current directory. When installed by the Debian Package to /usr/share the plugins do not work because creepy does not have the required priviledges there.
This patch reads the configuration from /usr/share and then when writing the new configuration, writes the non-default values to ~/.creepy. Thereafter the configuration is read from both /usr/share and ~/.creepy. This keeps the original configuration file intact and allow default values to change when the package is upgraded without having to edit files in the users home directories.