def _add_event_to_staff_cal(self, srv, cals, staff): href = '' for cal in cals: if cal.content.src.find(urllib.quote(staff.email)) != -1: href = cal.content.src if href: event = insert_single_event(srv, self.brief(), self.description, str(self.client.address), self.start_date, self.due_date, href)
def _add_event_to_admin_cal(self, srv, cals, admin_email): for cal in cals: if cal.content.src.find(urllib.quote(admin_email)) != -1: href = cal.content.src event = insert_single_event(srv, self.brief(), self.description, str(self.client.address), self.start_date, self.due_date, href)