From d1b5076360211fd3b2897284445efa3a3d3b4f6b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 7 Dec 2008 12:35:27 -0800 Subject: [PATCH] Fix #1360 (Error when cancelling "Load recipie from file" in add custom news source window) --- src/calibre/gui2/dialogs/user_profiles.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/calibre/gui2/dialogs/user_profiles.py b/src/calibre/gui2/dialogs/user_profiles.py index efb34239c0..005c947a94 100644 --- a/src/calibre/gui2/dialogs/user_profiles.py +++ b/src/calibre/gui2/dialogs/user_profiles.py @@ -228,16 +228,16 @@ class %(classname)s(%(base_class)s): error_dialog(self, _('Invalid input'), _('

Could not create recipe. Error:
%s')%str(err)).exec_() return - try: - self.available_profiles.add_item(title, (title, src), replace=False) - except ValueError: - d = question_dialog(self, _('Replace recipe?'), - _('A custom recipe named %s already exists. Do you want to replace it?')%title) - if d.exec_() == QMessageBox.Yes: - self.available_profiles.add_item(title, (title, src), replace=True) - else: - return - self.clear() + try: + self.available_profiles.add_item(title, (title, src), replace=False) + except ValueError: + d = question_dialog(self, _('Replace recipe?'), + _('A custom recipe named %s already exists. Do you want to replace it?')%title) + if d.exec_() == QMessageBox.Yes: + self.available_profiles.add_item(title, (title, src), replace=True) + else: + return + self.clear() def populate_options(self, profile): self.oldest_article.setValue(profile.oldest_article)