本文整理匯總了Python中stoqlib.lib.webservice.WebService.tef_request方法的典型用法代碼示例。如果您正苦於以下問題:Python WebService.tef_request方法的具體用法?Python WebService.tef_request怎麽用?Python WebService.tef_request使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類stoqlib.lib.webservice.WebService
的用法示例。
在下文中一共展示了WebService.tef_request方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: next_step
# 需要導入模塊: from stoqlib.lib.webservice import WebService [as 別名]
# 或者: from stoqlib.lib.webservice.WebService import tef_request [as 別名]
def next_step(self):
# We already sent the details, but may still be on the same step.
if self.wizard.tef_request_done:
return StoqAdminPasswordStep(self.wizard, self.previous)
webapi = WebService()
response = webapi.tef_request(self.model.name, self.model.email,
self.model.phone)
response.addCallback(self._on_response_done)
response.addErrback(self._on_response_error)
# FIXME: This is a hack, remove it when we can avoid
# calling dialog.run()
if not reactor.running:
reactor.run()
self.send_progress.show()
self.send_progress.set_text(_('Sending...'))
self.send_progress.set_pulse_step(0.05)
self.details_table.set_sensitive(False)
self.wizard.next_button.set_sensitive(False)
glib.timeout_add(50, self._pulse)
# Cancel the request after 30 seconds without a reply
glib.timeout_add(30000, self._cancel_request)
# Stay on the same step while sending the details
return self