Skip to content

Commit

Permalink
import cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zopyx committed Mar 16, 2008
1 parent 8600799 commit 4dd30c4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/z3c/sqlalchemy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
# and ZOPYX Ltd. & Co. KG, Tuebingen, Germany
##########################################################################

import random
import threading

import sqlalchemy
from sqlalchemy.engine.url import make_url
from sqlalchemy.orm import sessionmaker, scoped_session

import transaction
from transaction.interfaces import ISavepointDataManager, IDataManagerSavepoint
from zope.interface import implements
from zope.component import getUtility
from zope.component.interfaces import ComponentLookupError
Expand Down Expand Up @@ -57,7 +54,6 @@ def __init__(self, dsn, model=None, transactional=True, engine_options={}, sessi
self.session_options = session_options
self._model = None
self._createEngine()
self._id = str(random.random()) # used as unique key for session/connection cache

if model:

Expand Down Expand Up @@ -102,7 +98,7 @@ def session(self):
return session

@property
def session(self):
def connection(self):
return session.connection()._Connection__connection.connection

def registerMapper(self, mapper, name):
Expand Down

0 comments on commit 4dd30c4

Please sign in to comment.