(picBuf)
| 243 | waitForPhoto = None |
| 244 | |
| 245 | def onDone(picBuf): |
| 246 | result = False |
| 247 | |
| 248 | if picBuf: |
| 249 | picData = astroprintCloud().uploadImageFile(timelapseId, picBuf) |
| 250 | #we need to check again as it's possible that this was the last |
| 251 | #pic and the timelapse is closed. |
| 252 | if picData and self.timelapseInfo: |
| 253 | self.timelapseInfo['last_photo'] = picData['url'] |
| 254 | self._eventManager.fire(Events.CAPTURE_INFO_CHANGED, self.timelapseInfo) |
| 255 | result = True |
| 256 | |
| 257 | if waitForPhoto and not waitForPhoto.isSet(): |
| 258 | responseCont[0] = result |
| 259 | waitForPhoto.set() |
| 260 | |
| 261 | self.get_pic_async(onDone, text) |
| 262 |
nothing calls this directly
no test coverage detected