Commits

Robert Brewer  committed 0c21702

Fix for #865 (_ThreadLocalProxy's child may not have a size).

  • Participants
  • Parent commits de6021a

Comments (0)

Files changed (1)

File cherrypy/__init__.py

     def __len__(self):
         child = getattr(serving, self.__attrname__)
         return len(child)
+    
+    def __nonzero__(self):
+        child = getattr(serving, self.__attrname__)
+        return bool(child)
 
 
 # Create request and response object (the same objects will be used