def set_photo_url(self, url):
self._set('photo-url', url)
- def update_friend(self, other_friend, overwrite=False):
+ def update_from_friend(self, other_friend, overwrite=False):
"""
Overwrites any attributes in this friend, with attributes from other_friend
"""
friend = service.process_contact(contact)
if friend:
contact.add_mapping(service.get_id())
- friend.update_friend(result)
+ result.update_from_friend(friend)
if result.get_name() is not None:
- self.update_contact(result, overwrite_existing_fields)
+ self.update_contact(contact, result, overwrite_existing_fields)
else:
self.unmatched.append(contact)
self._progress("Finalising...", current_tick, total_ticks)
current_tick += len(contacts)
service.finalise(self.updated, overwrite_existing_fields)
+ self.friends[service.get_id] = service.get_unmatched_friends()
# commit changes
tick_increment = total_contacts / (len(self.updated) or 1)