Changeset View
Changeset View
Standalone View
Standalone View
pykolab/xml/contact.py
Show First 20 Lines • Show All 322 Lines • ▼ Show 20 Lines | class Contact(kolabformat.Contact): | ||||
def __str__(self): | def __str__(self): | ||||
xml = kolabformat.writeContact(self) | xml = kolabformat.writeContact(self) | ||||
error = kolabformat.error() | error = kolabformat.error() | ||||
if error == None or not error: | if error == None or not error: | ||||
return xml | return xml | ||||
else: | else: | ||||
raise ContactIntegrityError, kolabformat.errorMessage() | raise ContactIntegrityError(kolabformat.errorMessage()) | ||||
class ContactIntegrityError(Exception): | class ContactIntegrityError(Exception): | ||||
def __init__(self, message): | def __init__(self, message): | ||||
Exception.__init__(self, message) | Exception.__init__(self, message) |