[PythonReports-checkins] PythonReports/PythonReports template.py, 1.9, 1.10
Brought to you by:
a1s
From: Alexey L. <a-...@us...> - 2011-11-25 10:06:48
|
Update of /cvsroot/pythonreports/PythonReports/PythonReports In directory vz-cvs-3.sog:/tmp/cvs-serv15647 Modified Files: template.py Log Message: explicitly set Report.filename Index: template.py =================================================================== RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/template.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** template.py 19 Dec 2006 14:44:56 -0000 1.9 --- template.py 25 Nov 2011 10:06:46 -0000 1.10 *************** *** 1,4 **** --- 1,5 ---- """PythonReports Template (PRT) structures""" """History (most recent first): + 25-nov-2011 [luch] explicitly set Report.filename 19-dec-2006 [als] fix: Arg value is expression 15-dec-2006 [als] added Arg and Subreport *************** *** 38,41 **** --- 39,44 ---- ] + import os + from PythonReports.datatypes import * *************** *** 384,387 **** --- 387,391 ---- tree.groups = {} tree.fonts = {} + tree.filename = None # don't create datablocks here - will be done in Layout prevalidator *************** *** 404,410 **** def load(source): ! """Load printout file, return ElementTree""" _et = ElementTree(Report) _et.parse(source) return _et --- 408,417 ---- def load(source): ! """Load template file, return ElementTree""" _et = ElementTree(Report) _et.parse(source) + if os.path.exists(source): + # XXX bad heuristics + _et.filename = source return _et |