Fixed many W601 errors.

Fixed W601 .has_key() is deprecated PEP8 errors.