當前位置: 首頁>>代碼示例>>Python>>正文


Python TuneTest.finishedChecking方法代碼示例

本文整理匯總了Python中Components.TuneTest.TuneTest.finishedChecking方法的典型用法代碼示例。如果您正苦於以下問題:Python TuneTest.finishedChecking方法的具體用法?Python TuneTest.finishedChecking怎麽用?Python TuneTest.finishedChecking使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Components.TuneTest.TuneTest的用法示例。


在下文中一共展示了TuneTest.finishedChecking方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: finishedChecking

# 需要導入模塊: from Components.TuneTest import TuneTest [as 別名]
# 或者: from Components.TuneTest.TuneTest import finishedChecking [as 別名]
    def finishedChecking(self):
        print "finishedChecking"
        TuneTest.finishedChecking(self)

        if not self.results.has_key(self.currentlyTestedIndex):
            self.results[self.currentlyTestedIndex] = {
                "failed": [],
                "successful": [],
                "status": None,
                "internalstatus": None,
            }

        if len(self.failedTune) > 0 and len(self.successfullyTune) > 0:
            self.changeProgressListStatus(self.currentlyTestedIndex, "with errors")
            self["witherrors_counter"].setText(str(int(self["witherrors_counter"].getText()) + 1))
            self.addResult(self.currentlyTestedIndex, "with_errors", self.failedTune, self.successfullyTune)
        elif len(self.failedTune) == 0 and len(self.successfullyTune) == 0:
            self.changeProgressListStatus(self.currentlyTestedIndex, "not tested")
            self["untestable_counter"].setText(str(int(self["untestable_counter"].getText()) + 1))
            self.addResult(self.currentlyTestedIndex, "untestable", self.failedTune, self.successfullyTune)
        elif len(self.failedTune) > 0:
            self.changeProgressListStatus(self.currentlyTestedIndex, "failed")
            # self["failed_counter"].setText(str(int(self["failed_counter"].getText()) + len(self.failedTune)))
            self["failed_counter"].setText(str(int(self["failed_counter"].getText()) + 1))
            self.addResult(self.currentlyTestedIndex, "failed", self.failedTune, self.successfullyTune)
        else:
            self.changeProgressListStatus(self.currentlyTestedIndex, "successful")
            # self["succeeded_counter"].setText(str(int(self["succeeded_counter"].getText()) + len(self.successfullyTune)))
            self["succeeded_counter"].setText(str(int(self["succeeded_counter"].getText()) + 1))
            self.addResult(self.currentlyTestedIndex, "successful", self.failedTune, self.successfullyTune)

            # self["failed_counter"].setText(str(int(self["failed_counter"].getText()) + len(self.failedTune)))
            # self["succeeded_counter"].setText(str(int(self["succeeded_counter"].getText()) + len(self.successfullyTune)))
            # if len(self.failedTune) == 0 and len(self.successfullyTune) == 0:
            # self["untestable_counter"].setText(str(int(self["untestable_counter"].getText()) + 1))

        self.currentlyTestedIndex = self.getNextIndex()
        self.addProgressListItem(self.currentlyTestedIndex)

        if self.fillTransponderList():
            self.run(checkPIDs=True)
        else:
            self.running = False
            self["progress_list"].setIndex(0)
            print "results:", self.results
            print "resultsstatus:", self.resultsstatus
            if self.log:
                file = open("/media/hdd/diseqctester.log", "w")
                self.setResultType(ResultParser.TYPE_ALL)
                file.write(self.getTextualResult())
                file.close()
                self.session.open(
                    MessageBox,
                    text=_("The results have been written to %s.") % "/media/hdd/diseqctester.log",
                    type=MessageBox.TYPE_INFO,
                )
開發者ID:kakunbsc,項目名稱:enigma2.2,代碼行數:58,代碼來源:plugin.py

示例2: finishedChecking

# 需要導入模塊: from Components.TuneTest import TuneTest [as 別名]
# 或者: from Components.TuneTest.TuneTest import finishedChecking [as 別名]
	def finishedChecking(self):
		print "finishedChecking"
		TuneTest.finishedChecking(self)

		if self.currentlyTestedIndex not in self.results:
			self.results[self.currentlyTestedIndex] = {"failed": [], "successful": [], "status": None, "internalstatus": None}

		if len(self.failedTune) > 0 and len(self.successfullyTune) > 0:
			self.changeProgressListStatus(self.currentlyTestedIndex, _("with errors"))
			self["witherrors_counter"].setText(str(int(self["witherrors_counter"].getText()) + 1))
			self.addResult(self.currentlyTestedIndex, _("with_errors"), self.failedTune, self.successfullyTune)
		elif len(self.failedTune) == 0 and len(self.successfullyTune) == 0:
			self.changeProgressListStatus(self.currentlyTestedIndex, _("not tested"))
			self["untestable_counter"].setText(str(int(self["untestable_counter"].getText()) + 1))
			self.addResult(self.currentlyTestedIndex, _("untestable"), self.failedTune, self.successfullyTune)
		elif len(self.failedTune) > 0:
			self.changeProgressListStatus(self.currentlyTestedIndex, _("failed"))
			self["failed_counter"].setText(str(int(self["failed_counter"].getText()) + 1))
			self.addResult(self.currentlyTestedIndex, _("failed"), self.failedTune, self.successfullyTune)
		else:
			self.changeProgressListStatus(self.currentlyTestedIndex, _("successful"))
			self["succeeded_counter"].setText(str(int(self["succeeded_counter"].getText()) + 1))
			self.addResult(self.currentlyTestedIndex, _("successful"), self.failedTune, self.successfullyTune)

		self.currentlyTestedIndex = self.getNextIndex()
		self.addProgressListItem(self.currentlyTestedIndex)

		if self.fillTransponderList():
			self.run()
		else:
			self.running = False
			self["progress_list"].setIndex(0)
			print "results:", self.results
			print "resultsstatus:", self.resultsstatus
			if self.log:
				try:
					file = open("/tmp/diseqctester.log", "w")
					self.setResultType(ResultParser.TYPE_ALL)
					file.write(self.getTextualResult())
					file.close()
					self.session.open(MessageBox, text = _("The results have been written to %s") % "/tmp/diseqctester.log", type = MessageBox.TYPE_INFO, timeout = 5)
				except:
					pass
開發者ID:hd75hd,項目名稱:enigma2,代碼行數:45,代碼來源:plugin.py


注:本文中的Components.TuneTest.TuneTest.finishedChecking方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。