decred / tinydecred

Python tools for Decred
ISC License
27 stars 14 forks source link

screens: Continue on open file cancel. #183

Closed JoeGruffins closed 4 years ago

JoeGruffins commented 4 years ago

closes #172

Rather than throwing an exception when restoring a wallet from file, just return, allowing the user to do something else.

Create a logging helper for errors that logs to stdErr and the main ui window.

Do not move a user's wallet file without warning. Copy it instead.

Check that the file is a sqlite database, otherwise you get stuck in a loop until you delete or move the file manually.

The method for checking whether the database is valid comes from here: https://stackoverflow.com/questions/3888529/how-to-tell-if-sqlite-database-file-is-valid-or-not