Browse Source

expand the repr's..

[git-p4: depot-paths = "//depot/": change = 885]
v0.3
John-Mark Gurney 18 years ago
parent
commit
7cefb1b6ad
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      FSStorage.py

+ 10
- 2
FSStorage.py View File

@@ -83,9 +83,11 @@ class FSObject(object):
def doUpdate(self):
raise NotImplementedError


def __repr__(self):
return '<%s.%s: path: %s>' % (self.__class__.__module__,
self.__class__.__name__, self.FSpath)
return '<%s.%s: path: %s, id: %s, parent: %s, title: %s>' % \
(self.__class__.__module__, self.__class__.__name__,
self.FSpath, self.id, self.parentID, self.title)

class NullConsumer(file, abstract.FileDescriptor):
implements(interfaces.IConsumer)
@@ -287,3 +289,9 @@ class FSDirectory(FSObject, StorageFolder):
# Pass up to handle UpdateID
if doupdate:
StorageFolder.doUpdate(self)

def __repr__(self):
return ('<%s.%s: path: %s, id: %s, parent: %s, title: %s, ' + \
'cnt: %d>') % (self.__class__.__module__,
self.__class__.__name__, self.FSpath, self.id,
self.parentID, self.title, len(self))

Loading…
Cancel
Save