Skip to content

Commit

Permalink
Fix IndexError after failed edit (#812)
Browse files Browse the repository at this point in the history
Signed-off-by: James Hewitt <[email protected]>
Co-authored-by: Jakub Wilk <[email protected]>
  • Loading branch information
Jamstah and jwilk authored Apr 24, 2024
1 parent 47c670f commit e0ea9d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 4 additions & 5 deletions lib/urlwatch/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e0ea9d2

Please sign in to comment.