- target_created_persons = self.driver.shell.GetPersons ({'peer_id':None, 'person_id':target_created_person_ids},person_fields)
- persons_by_person_id = { person['person_id'] : person for person in target_existing_persons + target_created_persons }
+ # also we avoid issuing a call if possible
+ target_created_persons = [] if not target_created_person_ids \
+ else driver.shell.GetPersons ({'peer_id':None, 'person_id':target_created_person_ids},
+ person_fields)
+ persons_by_person_id = { person['person_id'] : person \
+ for person in target_existing_persons + target_created_persons }