[Zope-Checkins] CVS: Products/DCOracle2/DCOracle2 - DCOracle2.py:1.76

Matthew T. Kromer matt@zope.com
Wed, 24 Oct 2001 17:41:42 -0400


Update of /cvs-repository/Products/DCOracle2/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv18267/DCOracle2

Modified Files:
	DCOracle2.py 
Log Message:
Updated debug information; added Version method on connection object to extract
product version information from Oracle.  Debug tab on managment screen in
Zope updated as well.


=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.75 => 1.76 ===
 
 # NONAPI
-
 def leakcheck():
     """Look for leaks in dco2 objects"""
     refs = {}
@@ -326,6 +325,19 @@
             raise AttributeError, 'Unassignable attribute, '+name
 
 
+    # NONAPI
+    def Version(self):
+        d = {}
+        c = self.cursor()
+        try:
+            c.execute("SELECT * FROM PRODUCT_COMPONENT_VERSION")
+        except DatabaseError:
+            return None
+        for (product, vers, production) in c.fetchall():
+            d[product] = "%s (%s)" % (vers, production)
+        del c
+        d['DCOracle2'] = version
+        return d
 
     # NONAPI
     #