fix pylint warnings for travis job

it popped out in https://travis-ci.org/Katello/katello/jobs/5223449
Fixing undefined method index errors
Merge pull request #1694 from daviddavis/index_errors

Fixing undefined index errors
Merge pull request #1692 from pitr-ch/quick-fix/pylint

fix pylint warnings for travis job