has_key() removed in python 3.x (found by Flake8)

Squash
More Flake8 found issues corrected or comment added

Signed-off-by: David Zafman <dzafman@redhat.com>