[rhmessaging-commits] rhmessaging commits: r3200 - mgmt/trunk/wooly/python/wooly.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Mar 23 13:16:53 EDT 2009


Author: justi9
Date: 2009-03-23 13:16:53 -0400 (Mon, 23 Mar 2009)
New Revision: 3200

Modified:
   mgmt/trunk/wooly/python/wooly/__init__.py
Log:
In debug mode, annotate the rendered html with comments about which widget did what

Modified: mgmt/trunk/wooly/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/__init__.py	2009-03-23 16:51:46 UTC (rev 3199)
+++ mgmt/trunk/wooly/python/wooly/__init__.py	2009-03-23 17:16:53 UTC (rev 3200)
@@ -257,6 +257,12 @@
         if session.debug:
             call.close()
 
+            if self.parent:
+                cls = self.__class__
+                name = self.__repr__()
+                string = "<!-- \nopen: %s\n -->%s<!-- \nclose: %s\n -->" % \
+                    (name, string, name)
+
         return string
 
     def do_render(self, session, *args):
@@ -291,7 +297,8 @@
             print "    %-30s %s" % (key + ":", value)
 
     def __repr__(self):
-        return "%s('%s')" % (self.__class__.__name__, self.path)
+        return "%s.%s('%s')" % \
+            (self.__class__.__module__, self.__class__.__name__, self.path)
 
 class Frame(Widget):
     def show(self, session):




More information about the rhmessaging-commits mailing list