[PythonReports-checkins] PythonReports/PythonReports drivers.py, 1.3, 1.4
Brought to you by:
a1s
From: alexander s. <a1...@us...> - 2006-11-03 17:52:26
|
Update of /cvsroot/pythonreports/PythonReports/PythonReports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6837 Modified Files: drivers.py Log Message: fix image drivers loading (broken in revision 1.3) Index: drivers.py =================================================================== RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/drivers.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** drivers.py 1 Nov 2006 19:21:55 -0000 1.3 --- drivers.py 3 Nov 2006 17:52:24 -0000 1.4 *************** *** 6,9 **** --- 6,10 ---- """ """History (most recent first): + 03-nov-2006 [als] fix image drivers loading (broken in revision 1.3) 01-nov-2006 [als] get_driver won't fail if no image driver found (but the first image operation will raise an error) *************** *** 48,52 **** # load all available drivers if not _drivers: ! _driver = None # NOTE backend preference: # RL (ReportLab) is best for texts --- 49,61 ---- # load all available drivers if not _drivers: ! if type == "Image": ! # Use ImageDriver class from this module as dummy fallback driver ! # (will be overwritten as soon as any actual driver is found). ! # This will raise NotImplementdedError when the first image ! # operation is attempted, but if there are no images in report ! # then we can get through without image driver. ! _driver = _image_drivers[None] = ImageDriver ! else: ! _driver = None # NOTE backend preference: # RL (ReportLab) is best for texts *************** *** 245,255 **** return _rv - # Use above ImageDriver class as dummy fallback driver - # (will be overwritten as soon as any actual driver is found). - # This will raise NotImplementdedError when the first image - # operation is attempted, but if there are no images in report - # then we can get through without image driver. - _image_drivers[None] = ImageDriver - class TextDriver(object): --- 254,257 ---- |