RecordTimer.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:enigma2 作者: Openeight 项目源码 文件源码
def record(self, entry, ignoreTSC=False, dosave=True, loadtimer=False):
        check_timer_list = self.timer_list[:]
        timersanitycheck = TimerSanityCheck(check_timer_list,entry)
        answer = None
        if not timersanitycheck.check():
            if not ignoreTSC:
                print "[RecordTimer] timer conflict detected!"
                print timersanitycheck.getSimulTimerList()
                return timersanitycheck.getSimulTimerList()
            else:
                print "[RecordTimer] ignore timer conflict..."
                if not dosave and loadtimer:
                    simulTimerList = timersanitycheck.getSimulTimerList()
                    if entry in simulTimerList:
                        entry.disabled = True
                        if entry in check_timer_list:
                            check_timer_list.remove(entry)
                    answer = simulTimerList
        elif timersanitycheck.doubleCheck():
            print "[RecordTimer] ignore double timer..."
            return None
        entry.timeChanged()
        print "[Timer] Record " + str(entry)
        entry.Timer = self
        self.addTimerEntry(entry)
        if dosave:
            self.saveTimer()
        return answer
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号