Commit 8ca7d948 authored by Gerion Entrup's avatar Gerion Entrup
Browse files

sqlitequeue: PEP8

parent 64213521
......@@ -2,8 +2,10 @@ import threading
lock = threading.RLock()
class SqliteSession():
"""Special class for SQLAlchemy session with SQlite. DO NOT INSTANTIATE YOURSELF, use the get_Session method."""
"""Special class for SQLAlchemy session with SQlite.
DO NOT INSTANTIATE YOURSELF, use the get_Session method."""
def __init__(self):
assert(self._session is not None)
......@@ -40,6 +42,7 @@ class SqliteSession():
ret = self._session.close()
return ret
class SqliteQuery():
def __init__(self, table, session):
with lock:
......@@ -75,8 +78,8 @@ class SqliteQuery():
ret = self._query.all()
return ret
def get_Session(sessionclass):
session = sessionclass()
SqliteSession._session = session
return SqliteSession
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment