-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ft/config improvements #21
Conversation
Dynamic defaults are default config values that can only be determined at runtime. Therefore, we introduce variables in instantshare.default which will be substituted for concrete values as soon as an instantshare.conf is generated. Improve the documentation in instantshare.default and config.py.
…s a generic data store
Conflicts resolved: src/storage/dropbox.py
@florianluediger: I added your notes in commit 2a0f24e |
# TODO: encryption | ||
kvstore = KVStore(_name) | ||
|
||
# FIXME: There is several problems with this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
googledrive.py
needs to be updated before it can make use of the new feature.
As it stands right now, it is very outdated, as explained in the code comments.
Without having looked to deep into the code, I noticed the following when starting the program the first time without an instantshare.conf file (so it has to be automatically created): The program works just fine but the console output only shows |
I encountered that once before, but wasn't sure what happened, so I haven't been able to reproduce it. Thanks, I will look into that. |
It seems to be a problem with instantshare.py and the way the config parser is setup. Edit: as such, the issue already existed before this pull request, so we should add a bug on the issue tracker (#23). |
When using the KVStore the first time without creating a --> implement autocreation of the |
Will merge this evening or tomorrow if there are no major objections. |
|
||
def sync(self): | ||
data = {} | ||
data.update(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to copy the data of the dict at this point?
bdata = pickle.dumps(self) should work too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is: I did not want to save an instance of KVStore
, as that would include all the other attributes. It's just a bit cleaner, and if we end up changing KVStore
in the future, we won't break serialization.
PR looks fine to me, added one minor line comment. 👍 |
This pull request includes improvements to the config file and a framework for storing persistent application data.
The data can already be encrypted, the encryption feature is just not integrated yet. I will create a new issue for this and link it in this pull request later (edit: see #22).
Closes #15, closes #16.