[Vobject] his component already has a PROFILE or uses BEGIN
Adam Tauno Williams
awilliam at opengroupware.us
Thu Apr 29 05:01:42 CDT 2010
On Mon, 2010-04-19 at 15:23 -0700, Jeffrey Harris wrote:
> > vobject.base.VObjectError: 'This component already has a PROFILE or
> uses
> > BEGIN.'
> This is a bug. This may be the behavior you want for a vcalendar 1.0
> file, but it's not what you want for VCard. The logic involving
> PROFILE should just be removed, I think.
> The work around is to not include a profile in your vcard.
That isn't always the server's choice.
But it is simple enough to strip out the element:
@staticmethod
def _fix_card(data):
data = data.strip()
card = [ ]
for line in data.splitlines():
if (line[0:8] == 'PROFILE:'):
continue
else:
card.append(line)
return '\r\n'.join(card)
--
Adam Tauno Williams <awilliam at opengroupware.us>
More information about the VObject
mailing list