def _upload_failed(self, exception=None):
"""The upload failed, add a button to restart the upload.
Args:
exception: the error that caused the upload.
"""
logging.info("Adding try again button on upload failure.")
self.Freeze()
try_again = wx.Button(self, label="Try again")
self._upload_sizer.Add(try_again, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
self.Bind(wx.EVT_BUTTON, self._retry_upload, id=try_again.GetId())
self.Layout()
self.Thaw()
评论列表
文章目录