equal
deleted
inserted
replaced
109 def call(self): |
109 def call(self): |
110 self.cell_call() |
110 self.cell_call() |
111 |
111 |
112 def cell_call(self, row=0, col=0): |
112 def cell_call(self, row=0, col=0): |
113 self.row, self.col = row, col # in case one needs it |
113 self.row, self.col = row, col # in case one needs it |
114 _, tmpfile = tempfile.mkstemp('.png') |
114 fd, tmpfile = tempfile.mkstemp('.png') |
115 try: |
115 os.close(fd) |
116 self._generate(tmpfile) |
116 self._generate(tmpfile) |
117 self.w(open(tmpfile, 'rb').read()) |
117 self.w(open(tmpfile, 'rb').read()) |
118 finally: |
118 os.unlink(tmpfile) |
119 try: |
|
120 os.unlink(tmpfile) |
|
121 except Exception, ex: |
|
122 if sys.platform != 'win32': |
|
123 self.warning("can't delete %s : %s" % (tmpfile, ex)) |
|