Changeset 14256 for main/waeup.kofa/trunk/src
- Timestamp:
- 4 Nov 2016, 05:23:01 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r13974 r14256 30 30 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 31 31 from waeup.kofa.image import KofaImageFile 32 from reportlab.platypus.doctemplate import LayoutError 32 33 from waeup.kofa.imagestorage import DefaultFileStoreHandler 33 34 from waeup.kofa.interfaces import ( … … 186 187 except IOError: 187 188 return False, _('IOError: Application Slip could not be created.') 189 except LayoutError, err: 190 return False, _('Reportlab LayoutError: %s' % err) 188 191 # Add student 189 192 site = grok.getSite() -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r14110 r14256 31 31 from hurry.workflow.interfaces import ( 32 32 IWorkflowInfo, IWorkflowState, InvalidTransitionError) 33 from reportlab.platypus.doctemplate import LayoutError 33 34 from waeup.kofa.mandates.mandate import RefereeReportMandate 34 35 from waeup.kofa.applicants.interfaces import ( … … 868 869 _('Your image file is corrupted. ' 869 870 'Please replace.'), type='danger') 871 return self.redirect(self.url(self.context)) 872 except LayoutError, err: 873 view.flash( 874 'PDF file could not be created. Reportlab error message: %s' 875 % escape(err.message), 876 type="danger") 870 877 return self.redirect(self.url(self.context)) 871 878 self.response.setHeader( -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r14213 r14256 25 25 from reportlab.lib.styles import getSampleStyleSheet 26 26 from reportlab.platypus import Paragraph, Image, Table, Spacer 27 from reportlab.platypus.doctemplate import LayoutError 27 28 from zope.event import notify 28 29 from zope.schema.interfaces import ConstraintNotSatisfied … … 800 801 view.flash('Error in image file.') 801 802 return view.redirect(view.url(view.context)) 803 except LayoutError, err: 804 view.flash( 805 'PDF file could not be created. Reportlab error message: %s' 806 % escape(err.message), 807 type="danger") 808 return view.redirect(view.url(view.context)) 802 809 return pdf_stream 803 810
Note: See TracChangeset for help on using the changeset viewer.