PEP8 fixes for the catalogue app.  Fixes #1578.