Changeset 4033

Show
Ignore:
Timestamp:
04/14/2008 11:09:59 AM (3 months ago)
Author:
paul
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/lib/reportUtils.py

    r3054 r4033  
    3232 
    3333    def getTempFile(self, ext="pdf"): 
    34         fd, fname = tempfile.mkstemp(suffix=".%s" % ext) 
     34        if ext[0] != ".": 
     35            ext = ".%s" % ext  
     36        fd, fname = tempfile.mkstemp(suffix=ext) 
    3537        os.close(fd) 
    3638        self.append(fname)