def loadLectureActives(self): threshold = 5 lectureActiveAnonId = CourseStats.getLectureViewers(threshold) self.lectureActivesByAnon = {} for id in lectureActiveAnonId: try: self.lectureActivesByAnon[id] = self.users.getByAnon(id) except KeyError: pass