Browse Source

add a repr so when printing we know it's not just a dict (and when

it gets large, we don't end up w/ a very large print)..

[git-p4: depot-paths = "//depot/": change = 818]
v0.3
John-Mark Gurney 18 years ago
parent
commit
67d7c6a2e0
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      ContentDirectory.py

+ 3
- 0
ContentDirectory.py View File

@@ -257,6 +257,9 @@ class ContentDirectoryControl(UPnPPublisher, dict):
log.msg('CreateReference(ContainerID=%s, ObjectID=%s)' %
(`ContainerID`, `ObjectID`))

def __repr__(self):
return '<ContentDirectoryControl: cnt: %d, urlbase: %s, nextID: %d>' % (len(self), `self.urlbase`, self.nextID)

class ContentDirectoryServer(resource.Resource):
def __init__(self, title, *args, **kwargs):
resource.Resource.__init__(self)


Loading…
Cancel
Save