fixes #663
rebased onto 6a68d56cae0ed74e83a5cba9aba9ddcb8253ab42
updated for dict comprehension on py2.6
Commit b2174fa5 fixes this pull-request
Pull-Request has been merged by mikem@redhat.com
fixes #663