dabo Commit
Revision 4033
Date: 2008-04-14 11:09:59 -0700 (Mon, 14 Apr 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4033

Changed:
U   trunk/dabo/lib/reportUtils.py

Log:
Added for convenience the ability to send '.pdf' or 'pdf' as the temp file
extension, instead of having to remember whether or not to prepend the
dot.


Diff:
Modified: trunk/dabo/lib/reportUtils.py
===================================================================
--- trunk/dabo/lib/reportUtils.py       2008-04-06 16:04:33 UTC (rev 4032)
+++ trunk/dabo/lib/reportUtils.py       2008-04-14 18:09:59 UTC (rev 4033)
@@ -31,7 +31,9 @@
                self._tempFiles.append(f)
 
        def getTempFile(self, ext="pdf"):
-               fd, fname = tempfile.mkstemp(suffix=".%s" % ext)
+               if ext[0] != ".":
+                       ext = ".%s" % ext 
+               fd, fname = tempfile.mkstemp(suffix=ext)
                os.close(fd)
                self.append(fname)
                return fname




_______________________________________________
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/[EMAIL PROTECTED]

Reply via email to