当前位置: 首页>>代码示例>>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;未经允许,请勿转载。