fedora-infra/github2fedmsg — pull request #9 by ralphbean (2014-07-12 01:07:29+00:00)
Title: Fix an 'unbound session' error.

The problem is that ``request.context`` (which is a sqlalchemy user
object bound to a session), cannot have its attributes referenced after
``transaction.commit()`` has been called. This just saves the username
before that happens so we can use it at the end.

This was causing tracebacks for anyone who tried to refresh/sync their
account with github. The sync would succeed with
``transaction.commit()``, but after that the user would get a 500 error
(and be confused).