def purgeGroup(self): while True: users = System.groupMember(self.ovd_group_name) if users is None: return False if users == []: return True for user in users: # todo : check if the users is connected, if yes logoff his session if not System.userRemove(user): return False return False