[CalendarServer-changes] [10610] CalendarServer/trunk/twext/who/directory.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jan 31 14:08:05 PST 2013
Revision: 10610
http://trac.calendarserver.org//changeset/10610
Author: wsanchez at apple.com
Date: 2013-01-31 14:08:05 -0800 (Thu, 31 Jan 2013)
Log Message:
-----------
Add __repr__ to DirectoryRecord.
Modified Paths:
--------------
CalendarServer/trunk/twext/who/directory.py
Modified: CalendarServer/trunk/twext/who/directory.py
===================================================================
--- CalendarServer/trunk/twext/who/directory.py 2013-01-31 21:00:43 UTC (rev 10609)
+++ CalendarServer/trunk/twext/who/directory.py 2013-01-31 22:08:05 UTC (rev 10610)
@@ -86,6 +86,15 @@
self.service = service
self.fields = fields
+ def __repr__(self):
+ recordType = getattr(self.recordType, "description", self.recordType)
+
+ return "<%s (%s)%s>" % (
+ self.__class__.__name__,
+ recordType,
+ self.shortNames[0],
+ )
+
def __eq__(self, other):
if isinstance(self, other.__class__):
return (
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130131/4b38d861/attachment-0001.html>
More information about the calendarserver-changes
mailing list