Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even more async support #57

Merged
merged 6 commits into from
Jan 18, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
drop dead code
  • Loading branch information
jettify committed Jan 17, 2016
commit e6c4fd57b5e408a25f6f8030898162a8c803ca9b
13 changes: 0 additions & 13 deletions aiomysql/sa/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,3 @@ def _do_rollback(self):
def _do_commit(self):
yield from self._connection.commit_prepared(
self._xid, is_prepared=self._is_prepared)

if PY_35: # pragma: no branch
@asyncio.coroutine
def __aenter__(self):
return self

@asyncio.coroutine
def __aexit__(self, exc_type, exc_val, exc_tb):
if exc_type:
yield from self.rollback()
else:
if self._is_active:
yield from self.commit()