-
Notifications
You must be signed in to change notification settings - Fork 303
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 database move message #5506
Fix database move message #5506
Conversation
@@ -398,7 +395,7 @@ def handle(self, *args, **options): | |||
######################## | |||
|
|||
# Move database file (if exists) | |||
if install_clean and database_file and os.path.exists(database_file): | |||
if install_clean and database_file and database_exists: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## 0.17.x #5506 +/- ##
==========================================
- Coverage 62.77% 62.76% -0.02%
==========================================
Files 117 117
Lines 6555 6553 -2
==========================================
- Hits 4115 4113 -2
Misses 2440 2440
Continue to review full report at Codecov.
|
Simplify some of the reasoning around whether a database exists at a clean install
6eb3ddb
to
cc760cf
Compare
@mrpau-eugene could you check if I got it right? It's a bit complicated, would be nice with another pair of eyes to verify :) |
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.
Looks good to me!
if not options["interactive"] \ | ||
or raw_input_yn("Keep database file and upgrade to KA Lite version %s? " % VERSION) \ | ||
or not raw_input_yn("Remove database file '%s' now? " % database_file) \ | ||
or not raw_input_yn("WARNING: all data will be lost! Are you sure? "): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
Self-reviewed again, still looks good
Summary
The current setup command wrongly claims that a database file exists and will be backed up on a clean release: