[CalendarServer-changes] [9130] CalendarServer/trunk/calendarserver/tools/shell/vfs.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Apr 16 15:11:20 PDT 2012
Revision: 9130
http://trac.macosforge.org/projects/calendarserver/changeset/9130
Author: wsanchez at apple.com
Date: 2012-04-16 15:11:20 -0700 (Mon, 16 Apr 2012)
Log Message:
-----------
Fancier __repr__ for ListEntry.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/shell/vfs.py
Modified: CalendarServer/trunk/calendarserver/tools/shell/vfs.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/vfs.py 2012-04-16 22:05:32 UTC (rev 9129)
+++ CalendarServer/trunk/calendarserver/tools/shell/vfs.py 2012-04-16 22:11:20 UTC (rev 9130)
@@ -68,11 +68,19 @@
return self.toString()
def __repr__(self):
- return "<%s: (%s)%s %s>" % (
+ fields = self.fields.copy()
+ del fields["Name"]
+
+ if fields:
+ fields = " %s" % (fields,)
+ else:
+ fields = ""
+
+ return "<%s(%s): %r%s>" % (
self.__class__.__name__,
self.fileClass.__name__,
self.fileName,
- self.fields,
+ fields,
)
def isFolder(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120416/e2ba46d4/attachment.html>
More information about the calendarserver-changes
mailing list