-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix for issue #89(Improve savestate
error handling)
#92
base: master
Are you sure you want to change the base?
Conversation
Add better error messages for two problems. One is using savestate before having loaded at least a pubkey, and work as that identity. Another is using savestate to a write-protected file.
#pragma out Don't use savestate to a write-protected file. | ||
|
||
open('write_protected_file', 'w+').close() | ||
os.system('chmod a-w write_protected_file') |
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.
This won't work cross-platform (think Windows).
This unit test is to test error messages when using savestate before having loaded at least a pubkey, and work as that identity.
This unit test is to test error messages when using savestate to a write-protected file.
I have tested this pull request and this can be merged. Testing by running unit test: cib@cib-VirtualBox: Testing by manually entering command on seash:
Enabled modules: factoids, geoip, modules, uploaddir, variables !> savestate NO_KEYS_LOADED |
I fix
savestate
error message issue and create a unit test for this PR, this is test result: