Skip to content
Snippets Groups Projects
Verified Commit 6b1c3d1f authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

lister.core.db_utils: Remove dead code

parent f92ac836
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2015 Stefano Zacchiroli <zack@upsilon.cc>
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from contextlib import contextmanager
@contextmanager
def session_scope(mk_session):
session = mk_session()
try:
yield session
session.commit()
except: # noqa
session.rollback()
raise
finally:
session.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment