diff --git a/libs/data.py b/libs/data.py index 3b1f9a7..432f0a4 100644 --- a/libs/data.py +++ b/libs/data.py @@ -144,6 +144,8 @@ class Yuuki_Data: def getSEGroup(self, GroupID): SEMode = self.getGroup(GroupID)["SEGroup"] + if SEMode == None: + return None SEMode_ = {} for Mode in SEMode: SEMode_[int(Mode)] = SEMode[Mode] diff --git a/libs/yuuki.py b/libs/yuuki.py index ba10aaa..3df3e62 100644 --- a/libs/yuuki.py +++ b/libs/yuuki.py @@ -408,10 +408,13 @@ class Yuuki: NoWork = 0 catchedNews = [] ncMessage = Operation() - LastResetLimitTime = 0 + LastResetLimitTime = time.localtime().tm_hour Revision = self.client.getLastOpRevision() while True: try: + if time.localtime().tm_hour != LastResetLimitTime: + LastResetLimitTime = time.localtime().tm_hour + self.limitReset() if NoWork == 300: Revision = self.client.getLastOpRevision() catchedNews = self.listen.fetchOperations(Revision, 50)