Skip to content

Commit

Permalink
Be less odd.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jul 12, 2013
1 parent 2620f7b commit d710209
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tahrir_api/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ def __init__(self, dburi=None, session=None):
if dburi and session:
raise ValueError("Provide only one, either 'dburi' or 'session'")

self.session = session

if dburi:
self.session_maker = sessionmaker(bind=create_engine(dburi))
self.session = scoped_session(self.session_maker)
elif session:
self.session = session
else:
# Impossible to get here
pass

def badge_exists(self, badge_id):
"""
Expand Down

0 comments on commit d710209

Please sign in to comment.