PEP8: Remove trailing whitespaces (W291)
PEP8: Add whitespace around operators (E225)
PEP8: One statement per line (E702)
PEP8: No blank line at end of files (W391)
PEP8: Raise exceptions the correct way (W602)
PEP8: Remove redundant backslashes (E502)
PEP8: Indentation by multiples of 4 (E111)
PEP8: Only one space after operators (E222)
PEP8: Closing brackets to match indentation (E124)
PEP8: Use 'is' for boolean comparisons (E712)

There are 4 other occurences of this error, but we can't fix them
unfortunately.

They appear in some SQLObject queries, for example:

    PackageUpdate.select(PackageUpdate.q.pushed == True)

Replacing the "==" comparison by a "is" changes the queries, and they
actually start silently failing.
PEP8: Continuation intentation by multiples of 4 (E121)
PEP8: Distinguish continuation lines from indented block (E125)
PEP8: Don't use too much blank lines (E303)
PEP8: Add some missing whitespace (E301)
PEP8: Reindent continuation lines (E122)
PEP8: Drop space around brackets (E201 and E202)

This drops the whitespace after an opening bracket and the whitespace
before a closing bracket.
PEP8: Don't over-indent continuation lines (E127)
Don't evaluate the same condition twice

These two lines evaluate equivalent conditions:

    elif tg_errors.has_key('captcha'):
        if 'captcha' in tg_errors:

Therefore, having them one after the other is useless: the second one
will always be True if the first one was.

That means we can use only one fo them, reindent the whole block, and
drop the condition which will always be False:

    elif tg_errors.has_key('captcha'):
        if 'captcha' in tg_errors:
            ...

        else:
            # This can never be True
Drop useless condition

We can never go through that block, because if tg_errors does have a
'author' key, then we'd have been through the previous one, and we
wouldn't have checked whether it had a 'captcha' key.
PEP8: Stop using the deprecated .has_key() (W601)