Fix a miscapture bug.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Fix pyflakes warnings.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>