Fix regression introduced with !405
This fixes the problem reported in LHCbNightlyConf!1076 (merged).
I also fixed a couple of flake8 reports.
This fixes the problem reported in LHCbNightlyConf!1076 (merged).
I also fixed a couple of flake8 reports.