1. Guido Draheim
  2. trac-dvbcronrecording-plugin

Commits

Guido Draheim  committed 18d278c

python 2.7 / sqlalchemy 0.7 compatibility

  • Participants
  • Parent commits b6b10e6
  • Branches default

Comments (0)

Files changed (2)

File src/dvbcronrecording/db/schema.py

View file
  • Ignore whitespace
 
-import db4 
+import dvbcronrecording.db.db4 as _db 
 
-metadata = db4.metadata
+metadata = _db.metadata
 tables = metadata.sorted_tables # support old aff() detection
 
-RecordingTuning = db4.RecordingTuning
-RecordingChannels = db4.RecordingChannels
-RecordingChannelsConf = db4.RecordingChannelsConf
-RecordingList = db4.RecordingList
+RecordingTuning = _db.RecordingTuning
+RecordingChannels = _db.RecordingChannels
+RecordingChannelsConf = _db.RecordingChannelsConf
+RecordingList = _db.RecordingList
+
+pass

File src/dvbcronrecording/db/session.py

View file
  • Ignore whitespace
-from tsab import engine
+from tsab import engine, session
 from sqlalchemy.orm import create_session
 
 _session = None
 def context(env):
     global _session
     if _session is None:
-        _session = create_session(bind=engine(env))
+        _session = session(env) # create_session(bind=engine(env))
     return _session
 
 def db_cnx(env): return context(env)