W601: fixed deprecated used of has_key()