fix variable name (regression in the previous commit: 7a5e5c0c9228b245c7e927aef9e55a8cdf942591)
make duplicated host entries ignored if mac is 'RANDOM'
fix for PEP8 errors: E501 line too long