error checking
svn: r5005
This commit is contained in:
parent
66523b5c7c
commit
544e27232f
@ -63,7 +63,7 @@ import ReportOptions
|
|||||||
import BaseDoc
|
import BaseDoc
|
||||||
import ReportUtils
|
import ReportUtils
|
||||||
import ImgManip
|
import ImgManip
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog, WarningDialog
|
||||||
from NameDisplay import displayer as _nd
|
from NameDisplay import displayer as _nd
|
||||||
from DateHandler import displayer as _dd
|
from DateHandler import displayer as _dd
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ class BasePage:
|
|||||||
photo.get_description(),up=True)
|
photo.get_description(),up=True)
|
||||||
of.write('</div>\n')
|
of.write('</div>\n')
|
||||||
except (IOError,OSError),msg:
|
except (IOError,OSError),msg:
|
||||||
ErrorDialog(str(msg))
|
WarningDialog(_("Could not add photo to page"),str(msg))
|
||||||
|
|
||||||
def display_additional_images_as_gallery( self, of, db, photolist=None):
|
def display_additional_images_as_gallery( self, of, db, photolist=None):
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ class BasePage:
|
|||||||
self.media_link(of,photo_handle,newpath,
|
self.media_link(of,photo_handle,newpath,
|
||||||
photo.get_description(),up=True)
|
photo.get_description(),up=True)
|
||||||
except (IOError,OSError),msg:
|
except (IOError,OSError),msg:
|
||||||
ErrorDialog(str(msg))
|
WarningDialog(_("Could not add photo to page"),str(msg))
|
||||||
of.write('</blockquote>')
|
of.write('</blockquote>')
|
||||||
|
|
||||||
def display_note_object(self,of,noteobj=None):
|
def display_note_object(self,of,noteobj=None):
|
||||||
@ -770,7 +770,7 @@ class MediaPage(BasePage):
|
|||||||
of.write('src="../../%s" alt="%s"/>' % (newpath, self.page_title))
|
of.write('src="../../%s" alt="%s"/>' % (newpath, self.page_title))
|
||||||
of.write('</div>\n')
|
of.write('</div>\n')
|
||||||
except (IOError,OSError),msg:
|
except (IOError,OSError),msg:
|
||||||
ErrorDialog(str(msg))
|
WarningDialog(_("Could not add photo to page"),str(msg))
|
||||||
|
|
||||||
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
|
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
|
||||||
of.write('border="0">\n')
|
of.write('border="0">\n')
|
||||||
@ -898,7 +898,7 @@ class IntroductionPage(BasePage):
|
|||||||
of.write('alt="%s" />' % obj.get_description())
|
of.write('alt="%s" />' % obj.get_description())
|
||||||
of.write('</div>\n')
|
of.write('</div>\n')
|
||||||
except (IOError,OSError),msg:
|
except (IOError,OSError),msg:
|
||||||
ErrorDialog(str(msg))
|
WarningDialog(_("Could not add photo to page"),str(msg))
|
||||||
|
|
||||||
note_obj = obj.get_note_object()
|
note_obj = obj.get_note_object()
|
||||||
if note_obj:
|
if note_obj:
|
||||||
@ -945,7 +945,7 @@ class HomePage(BasePage):
|
|||||||
of.write('alt="%s" />' % obj.get_description())
|
of.write('alt="%s" />' % obj.get_description())
|
||||||
of.write('</div>\n')
|
of.write('</div>\n')
|
||||||
except (IOError,OSError),msg:
|
except (IOError,OSError),msg:
|
||||||
ErrorDialog(str(msg))
|
WarningDialog(_("Could not add photo to page"),str(msg))
|
||||||
|
|
||||||
note_obj = obj.get_note_object()
|
note_obj = obj.get_note_object()
|
||||||
if note_obj:
|
if note_obj:
|
||||||
@ -1146,7 +1146,7 @@ class ContactPage(BasePage):
|
|||||||
of.write('</td></tr></table>\n')
|
of.write('</td></tr></table>\n')
|
||||||
of.write('</div>\n')
|
of.write('</div>\n')
|
||||||
except (IOError,OSError),msg:
|
except (IOError,OSError),msg:
|
||||||
ErrorDialog(str(msg))
|
WarningDialog(_("Could not add photo to page"),str(msg))
|
||||||
|
|
||||||
r = get_researcher()
|
r = get_researcher()
|
||||||
|
|
||||||
@ -1867,9 +1867,12 @@ class WebReport(Report.Report):
|
|||||||
next = None
|
next = None
|
||||||
else:
|
else:
|
||||||
next = photo_keys[index]
|
next = photo_keys[index]
|
||||||
MediaPage(self.database, self.title, photo_handle, source_list,
|
try:
|
||||||
self.options, archive, photo_list[photo_handle],
|
MediaPage(self.database, self.title, photo_handle, source_list,
|
||||||
(prev, next, index, total), levels)
|
self.options, archive, photo_list[photo_handle],
|
||||||
|
(prev, next, index, total), levels)
|
||||||
|
except (IOError,OSError),msg:
|
||||||
|
WarningDialog(_("Missing media object"),str(msg))
|
||||||
self.progress_bar_step()
|
self.progress_bar_step()
|
||||||
prev = photo_handle
|
prev = photo_handle
|
||||||
index += 1
|
index += 1
|
||||||
@ -2175,10 +2178,7 @@ class WebReportDialog(Report.ReportDialog):
|
|||||||
|
|
||||||
response = self.window.run()
|
response = self.window.run()
|
||||||
if response == gtk.RESPONSE_OK:
|
if response == gtk.RESPONSE_OK:
|
||||||
try:
|
self.make_report()
|
||||||
self.make_report()
|
|
||||||
except (IOError,OSError),msg:
|
|
||||||
ErrorDialog(str(msg))
|
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
||||||
def setup_style_frame(self):
|
def setup_style_frame(self):
|
||||||
@ -2273,7 +2273,6 @@ class WebReportDialog(Report.ReportDialog):
|
|||||||
(m1,m2) = msg.messages()
|
(m1,m2) = msg.messages()
|
||||||
ErrorDialog(m1,m2)
|
ErrorDialog(m1,m2)
|
||||||
|
|
||||||
|
|
||||||
def sort_people(db,handle_list):
|
def sort_people(db,handle_list):
|
||||||
import sets
|
import sets
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user