diff --git a/ChangeLog b/ChangeLog index 7b75d5c8c..196e3d482 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-01-30 Don Allingham + * src/ReportBase/_ReportDialog.py: error reporting + * src/plugins/NarrativeWeb.py: error reporting + 2007-01-30 Alex Roitman * configure.in: Bump up the version. @@ -8,8 +12,8 @@ 2007-01-29 Benny Malengier * src/DataViews/_PersonView.py: numlock handling * src/PageView.py: numlock handling - * src/Filters/_SearchBar.py: numblock handling - * src/Filters/SideBar/_SidebarFilter.py: numblock handling + * src/Filters/_SearchBar.py: numlock handling + * src/Filters/SideBar/_SidebarFilter.py: numlock handling 2007-01-29 Don Allingham * src/DataViews/_PersonView.py: refactoring diff --git a/src/ReportBase/_ReportDialog.py b/src/ReportBase/_ReportDialog.py index dd432892a..56bfac5cf 100644 --- a/src/ReportBase/_ReportDialog.py +++ b/src/ReportBase/_ReportDialog.py @@ -667,6 +667,9 @@ def report(dbstate,uistate,person,report_class,options_class, elif category in (CATEGORY_BOOK,CATEGORY_CODE,CATEGORY_VIEW,CATEGORY_WEB): try: report_class(dbstate,uistate,person) + except Error, msg: + ErrorDialog(_("Error generating report"), + str(msg)) except Errors.WindowActiveError: pass return diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index d6529f5cd..9e9b367c3 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -158,6 +158,7 @@ class BasePage: self.graphgens = options.handler.options_dict['NWEBgraphgens'] self.use_home = self.options.handler.options_dict['NWEBhomenote'] != "" self.page_title = "" + self.warn_dir = True def store_file(self,archive,html_dir,from_path,to_path): if archive: @@ -167,7 +168,18 @@ class BasePage: dirname = os.path.dirname(dest) if not os.path.isdir(dirname): os.makedirs(dirname) - shutil.copyfile(from_path,dest) + if from_path != dest: + shutil.copyfile(from_path,dest) + elif self.warn_dir: + WarningDialog( + _("Possible destination error") + _("You appear to have set your target directory " + "to a directory used for data storage. This " + "could create problems with file management. " + "It is recommended that you consider using " + "a different directory to store your generated " + "web pages.")) + self.warn_dir = False def copy_media(self,photo,store_ref=True):