This commit is contained in:
SuperSonic 2019-08-25 02:44:17 +08:00
parent c32a711338
commit af76a1602a
2 changed files with 6 additions and 1 deletions

View file

@ -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]

View file

@ -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)