applying patch from adiroiban and multani, refs #7007

git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/branches/twisted-test-pyflakes-7007-2@43367 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb