2007-06-30 Alex Roitman <shura@gramps-project.org>

* src/ReportBase/_TemplateParser.py: Close file after parsing.
	* src/ReportBase/_ReportOptions.py (OptionListCollection.parse):
	Close file after parsing.
	* src/ReportBase/_PaperMenu.py: Close file after parsing.
	* src/plugins/BookReport.py (BookList.parse): Close file after parsing.
	* src/Filters/_FilterList.py (load): Close file after parsing.
	* src/BaseDoc.py (StyleSheetList.parse): Close file after parsing.



svn: r8687
This commit is contained in:
Alex Roitman
2007-06-30 18:58:14 +00:00
parent 41ca2a1090
commit 953f45ce51
7 changed files with 33 additions and 12 deletions

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# Copyright (C) 2003-2007 Donald N. Allingham
# Copyright (C) 2007 Brian G. Matherly
#
# This program is free software; you can redistribute it and/or modify
@ -401,7 +401,9 @@ class BookList:
try:
p = make_parser()
p.setContentHandler(BookParser(self))
p.parse(self.file)
the_file = open(self.file)
p.parse(the_file)
the_file.close()
except (IOError,OSError,ValueError,SAXParseException):
pass