[Twisted-Python] Patch for dbgadgets.py

Steve Waterbury steve.waterbury at gsfc.nasa.gov
Fri Aug 2 10:09:31 EDT 2002


Steve Waterbury wrote:

> ... there
> seems to be a problem with ... dbgadgets.py, but
> I haven't messed with gadgets (don't need them yet), so I won't be
> looking at that.  ...

OK, I got obsessed and fixed it (just a "%" that occurred in a 
formatted string).  

I kind of like the little dbauth app ... does anyone use it?  
(I suspect not, since this appears to have been broken for a 
while ...)  

-- Steve.

Stephen C. Waterbury  http://misspiggy.gsfc.nasa.gov/people/waterbug.html
-------------- next part --------------
Index: Twisted/twisted/enterprise/dbgadgets.py
===================================================================
RCS file: /cvs/Twisted/twisted/enterprise/dbgadgets.py,v
retrieving revision 1.4
diff -c -r1.4 dbgadgets.py
*** Twisted/twisted/enterprise/dbgadgets.py	13 Mar 2002 22:38:06 -0000	1.4
--- Twisted/twisted/enterprise/dbgadgets.py	1 Aug 2002 20:41:07 -0000
***************
*** 79,86 ****
  class PerspectivesGadget(widgets.Gadget, widgets.Widget):
      title = " "
      def __init__(self, authorizer):
-         widgets.Gadget.__init__(self)
          self.authorizer = authorizer
  
      def display(self, request):
          """Display the intro list of forums. This is only called if there is no URI.
--- 79,86 ----
  class PerspectivesGadget(widgets.Gadget, widgets.Widget):
      title = " "
      def __init__(self, authorizer):
          self.authorizer = authorizer
+         widgets.Gadget.__init__(self)
  
      def display(self, request):
          """Display the intro list of forums. This is only called if there is no URI.
***************
*** 92,103 ****
          l = []
          l.append('''
          <h3> Perspectives for Identity: %s </h3>
!         <table cellpadding=4 cellspacing=1 border=0 width="95%">
          <tr bgcolor="#ff9900">
          <td COLOR="#000000"><b> Perspective Name </b> </td>
          <td COLOR="#000000"><b> Service </b> </td>
          <td COLOR="#000000"><b> Actions </b> </td>
!         </tr>\n''' % self.identityName)
  
          for (iname, pname, sname) in data:
              l.append( "<tr> <td>%s</td> <td> %s </td>" % (pname, sname) )
--- 92,103 ----
          l = []
          l.append('''
          <h3> Perspectives for Identity: %s </h3>
!         <table cellpadding=4 cellspacing=1 border=0 %s>
          <tr bgcolor="#ff9900">
          <td COLOR="#000000"><b> Perspective Name </b> </td>
          <td COLOR="#000000"><b> Service </b> </td>
          <td COLOR="#000000"><b> Actions </b> </td>
!         </tr>\n''' % (self.identityName, 'width="95%"'))
  
          for (iname, pname, sname) in data:
              l.append( "<tr> <td>%s</td> <td> %s </td>" % (pname, sname) )



More information about the Twisted-Python mailing list