dabo Commit
Revision 3678
Date: 2007-11-14 09:11:45 -0800 (Wed, 14 Nov 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3678
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Fixed report writer to accept file-like objects (not just file objects) in
the OutputFile property. Thanks to Carl Karsten, who is integrating Dabo's
report writer into the PyCon Django web application for printing the
PyCon registration badges.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2007-11-14 14:10:02 UTC (rev 3677)
+++ trunk/dabo/lib/reportWriter.py 2007-11-14 17:11:45 UTC (rev 3678)
@@ -1894,7 +1894,8 @@
return v
def _setOutputFile(self, val):
- if isinstance(val, file):
+ if not isinstance(val, basestring):
+ # We assume it is either a file or file-like object
self._outputFile = val
else:
s = os.path.split(val)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]