diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a099511..5cfd51ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/ - Fix compatibility with lxml >= 5 which caused the CSS Selector filter to fail (#783 reported by jamesquilty, PR #786 by jamstah) - Fix pep8 test to ignore files in the site-packages directory for cases where the venv is in the project directory (#788 by jamstah) - Fix HTML diff table rendering for long line lengths (#793 by trevorshannon) +- Fix IndexError after failed edit (#801 by jwilk) ## [2.28] -- 2023-05-03 diff --git a/lib/urlwatch/storage.py b/lib/urlwatch/storage.py index bf0c88da..38d52110 100644 --- a/lib/urlwatch/storage.py +++ b/lib/urlwatch/storage.py @@ -277,11 +277,10 @@ def edit(self, example_file=None): print('======') print('') print('The file', file_edit, 'was NOT updated.') - user_input = input("Do you want to retry the same edit? (y/n)") - if user_input.lower()[0] == 'y': - continue - print('Your changes have been saved in', file_edit) - return 1 + user_input = input("Do you want to retry the same edit? (Y/n)") + if user_input.lower()[:1] == 'n': + print('Your changes have been saved in', file_edit) + return 1 atomic_rename(file_edit, self.filename) print('Saving edit changes in', self.filename)