[Zope-Checkins] CVS: Zope/lib/python/Products/ZGadflyDA - DA.py:1.15 DABase.py:1.12 __init__.py:1.14 db.py:1.13

Martijn Pieters mj@zope.com
Wed, 14 Aug 2002 18:25:49 -0400


Update of /cvs-repository/Zope/lib/python/Products/ZGadflyDA
In directory cvs.zope.org:/tmp/cvs-serv27658/ZGadflyDA

Modified Files:
	DA.py DABase.py __init__.py db.py 
Log Message:
Clean up indentation and trailing whitespace.


=== Zope/lib/python/Products/ZGadflyDA/DA.py 1.14 => 1.15 ===
--- Zope/lib/python/Products/ZGadflyDA/DA.py:1.14	Mon May 27 08:27:25 2002
+++ Zope/lib/python/Products/ZGadflyDA/DA.py	Wed Aug 14 18:25:17 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 database_type='Gadfly'
 __doc__='''%s Database Connection
@@ -31,7 +31,7 @@
     self, id, title, connection, check=None, REQUEST=None):
     """Add a DB connection to a folder"""
 
-    # Note - type checking is taken care of by _setObject 
+    # Note - type checking is taken care of by _setObject
     # and the Connection object constructor.
     self._setObject(id, Connection(
         id, title, connection, check))
@@ -51,13 +51,13 @@
         if hasattr(self, '_v_database_connection'):
             return self._v_database_connection.opened
         return ''
-    
+
     def title_and_id(self):
         s=_Connection.inheritedAttribute('title_and_id')(self)
         if (hasattr(self, '_v_database_connection') and
             self._v_database_connection.opened):
             s="%s, which is connected" % s
-        else: 
+        else:
             s="%s, which is <font color=red> not connected</font>" % s
         return s
 
@@ -66,7 +66,7 @@
         if (hasattr(self, '_v_database_connection') and
             self._v_database_connection.opened):
             s="%s (connected)" % s
-        else: 
+        else:
             s="%s (<font color=red> not connected</font>)" % s
         return s
 
@@ -78,7 +78,7 @@
                 c=self._v_database_connection=c[s]
                 if not c.opened: c.open()
                 return self
-    
+
             try:
                 try:
                     self._v_database_connection=c[s]=DB(s)
@@ -90,8 +90,7 @@
                         '<!--\n%s\n%s\n-->\n'
                         % (s,t,v)), tb
             finally: tb=None
-    
+
             return self
         finally:
             _connections_lock.release()
-


=== Zope/lib/python/Products/ZGadflyDA/DABase.py 1.11 => 1.12 ===
--- Zope/lib/python/Products/ZGadflyDA/DABase.py:1.11	Wed Nov 28 10:51:10 2001
+++ Zope/lib/python/Products/ZGadflyDA/DABase.py	Wed Aug 14 18:25:17 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 __doc__='''Database Connection
 
@@ -33,7 +33,7 @@
     manage_browse=HTMLFile('dtml/browse',globals())
 
     info=None
-        
+
     def tpValues(self):
         #if hasattr(self, '_v_tpValues'): return self._v_tpValues
         r=[]
@@ -104,7 +104,7 @@
             b.TABLE_NAME=tname
             r.append(b)
         return r
-            
+
     def tpId(self): return self._d['TABLE_NAME']
     def tpURL(self): return "Table/%s" % self._d['TABLE_NAME']
     def Name(self): return self._d['TABLE_NAME']
@@ -144,8 +144,8 @@
                     raise ValueError, (
                         'no default was given for <em>%s</em>' % n)
 
-            
-            
+
+
 
 class ColumnBrowser(Browser):
     icon='field'


=== Zope/lib/python/Products/ZGadflyDA/__init__.py 1.13 => 1.14 ===
--- Zope/lib/python/Products/ZGadflyDA/__init__.py:1.13	Wed Nov 28 10:51:10 2001
+++ Zope/lib/python/Products/ZGadflyDA/__init__.py	Wed Aug 14 18:25:17 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 __doc__='''Generic Database Adapter Package Registration
 
@@ -57,7 +57,7 @@
         self, self, REQUEST,
         database_type=database_type,
         data_sources=DA.data_sources)
-    
+
 def manage_addZGadflyConnection(
     self, id, title, connection, check=None, REQUEST=None):
     " "


=== Zope/lib/python/Products/ZGadflyDA/db.py 1.12 => 1.13 ===
--- Zope/lib/python/Products/ZGadflyDA/db.py:1.12	Wed Nov 28 10:51:10 2001
+++ Zope/lib/python/Products/ZGadflyDA/db.py	Wed Aug 14 18:25:17 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 
 '''$Id$'''
@@ -23,7 +23,7 @@
 data_dir=os.path.join(Globals.data_dir,'gadfly')
 
 def manage_DataSources():
-    
+
     if not os.path.exists(data_dir):
         try:
             os.mkdir(data_dir)
@@ -42,7 +42,7 @@
             existence of the directory, <code>%s</code>.  This
             exists, but is not a directory.
             """ % data_dir)
-    
+
     return map(
         lambda d: (d,''),
         filter(lambda f, i=os.path.isdir, d=data_dir, j=os.path.join:
@@ -112,7 +112,7 @@
                     'Multiple incompatible selects in '
                     'multiple sql-statement query'
                     )
-            
+
             if not result: result=c.fetchmany(max_rows)
             elif len(result) < max_rows:
                 result=result+c.fetchmany(max_rows-len(result))
@@ -134,7 +134,7 @@
                 'null': null_ok,
                 })
         return items, result
-    
+
     # Gadfly needs the extra checkpoint call.
     def _abort(self):
         self.db.rollback()