[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/SQLScript - SQLScript.py:1.2
Stephan Richter
srichter@cbu.edu
Fri, 12 Jul 2002 17:37:36 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/SQLScript
In directory cvs.zope.org:/tmp/cvs-serv27679/lib/python/Zope/App/OFS/Content/SQLScript
Modified Files:
SQLScript.py
Log Message:
Fixed some bugs that surfaced with the Package code. I do not understand
how it worked even before, but I am sure it works now. Yeah! ;)
=== Zope3/lib/python/Zope/App/OFS/Content/SQLScript/SQLScript.py 1.1 => 1.2 ===
from types import StringTypes
from Persistence import Persistent
-from Zope.ComponentArchitecture import getNextService
+from Zope.ComponentArchitecture import getService
from Zope.ContextWrapper import ContextMethod
from Zope.DocumentTemplate.DT_HTML import HTML
@@ -104,11 +104,7 @@
def getConnection(self):
'See Zope.App.RDB.ISQLCommand.ISQLCommand'
- try:
- parent = getParent(self)
- except:
- parent = self
- connection_service = getNextService(parent, "ConnectionService")
+ connection_service = getService(self, "ConnectionService")
connection = connection_service.getConnection(self.connectionName)
return connection