def cleanAbsentParticipantData(self): statesList = [] for item in self.Obj.USERS.values() : statesList.append(item[4]) #print statesList for name in os.listdir(Path.Cache) : if name not in statesList : if os.path.isfile(Path.cache(name)) : os.remove(Path.cache(name)) if os.path.isfile(Path.avatar(name)) : os.remove(Path.avatar(name)) if os.path.isfile(Path.tempCache(name)) : os.remove(Path.tempCache(name)) if os.path.isfile(Path.tempAvatar(name)) : os.remove(Path.tempAvatar(name))