Create the directory if it doesn't exist for the web calendar.
svn: r9190
This commit is contained in:
parent
c42bfa3caf
commit
8aaf924411
@ -1,3 +1,6 @@
|
||||
2007-10-15 Brian Matherly <brian@gramps-project.org>
|
||||
* src/plugins/WebCal.py: Create directory if it doesn't exist.
|
||||
|
||||
2007-10-14 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsBSDDB.py: fix gen calls
|
||||
|
||||
|
@ -446,6 +446,24 @@ class WebReport(Report):
|
||||
|
||||
def write_report(self):
|
||||
""" The short method that runs through each month and creates a page. """
|
||||
if not os.path.isdir(self.html_dir):
|
||||
parent_dir = os.path.dirname(self.html_dir)
|
||||
if not os.path.isdir(parent_dir):
|
||||
ErrorDialog(_("Neither %s nor %s are directories") % \
|
||||
(self.html_dir,parent_dir))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
os.mkdir(self.html_dir)
|
||||
except IOError, value:
|
||||
ErrorDialog(_("Could not create the directory: %s") % \
|
||||
self.html_dir + "\n" + value[1])
|
||||
return
|
||||
except:
|
||||
ErrorDialog(_("Could not create the directory: %s") % \
|
||||
self.html_dir)
|
||||
return
|
||||
|
||||
# initialize the dict to fill:
|
||||
self.calendar = {}
|
||||
self.progress = Utils.ProgressMeter(_("Generate HTML calendars"),'')
|
||||
|
Loading…
Reference in New Issue
Block a user