#NEWLINE# def GetPhoto( self , contact_entry_or_url ) : #NEWLINE# #INDENT# "Retrives the binary data for the contact's profile photo as a string.\n    \n    Args:\n      contact_entry_or_url: a gdata.contacts.ContactEntry objecr or a string\n         containing the photo link's URL. If the contact entry does not \n         contain a photo link, the image will not be fetched and this method\n         will return None.\n    " #NEWLINE# url = None #NEWLINE# if isinstance ( contact_entry_or_url , gdata . contacts . ContactEntry ) : #NEWLINE# #INDENT# photo_link = contact_entry_or_url . GetPhotoLink ( ) #NEWLINE# if photo_link : #NEWLINE# #INDENT# url = photo_link . href #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# url = contact_entry_or_url #NEWLINE# #UNINDENT# if url : #NEWLINE# #INDENT# return self . Get ( url , converter = str ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None