commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7215 - trunk/gnue-common/src/datasources/drivers/Base


From: reinhard
Subject: [gnue] r7215 - trunk/gnue-common/src/datasources/drivers/Base
Date: Thu, 17 Mar 2005 15:30:19 -0600 (CST)

Author: reinhard
Date: 2005-03-17 15:30:18 -0600 (Thu, 17 Mar 2005)
New Revision: 7215

Modified:
   trunk/gnue-common/src/datasources/drivers/Base/DataObject.py
Log:
Ignore (deprecated) commit, rollback and connect functions of DataObject if we
have no connection (static or unbound DataSource).


Modified: trunk/gnue-common/src/datasources/drivers/Base/DataObject.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/Base/DataObject.py        
2005-03-17 21:25:31 UTC (rev 7214)
+++ trunk/gnue-common/src/datasources/drivers/Base/DataObject.py        
2005-03-17 21:30:18 UTC (rev 7215)
@@ -154,16 +154,19 @@
   #
   def connect(self):
     # FIXME: make _dataConnection go away
-    if hasattr (self._connection, 'native'):
-      self._dataConnection = self._connection.native
+    if self._connection:
+      if hasattr (self._connection, 'native'):
+        self._dataConnection = self._connection.native
 
   def commit(self):
     GDebug.printMesg(1,'WARNING: The use of DataObject.commit() is deprecated')
-    self._connection.commit()
+    if self._connection:
+      self._connection.commit()
 
   def rollback(self):
     GDebug.printMesg(1,'WARNING: The use of DataObject.rollback() is 
deprecated')
-    self._connection.rollback()
+    if self._connection:
+      self._connection.rollback()
 
 
   #





reply via email to

[Prev in Thread] Current Thread [Next in Thread]