This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Transaction(object): | |
def __init__(self, db): | |
self.db = db | |
def __enter__(self): | |
return self.db.session | |
def __exit__(self, type, value, traceback): |
NewerOlder