Fixed syntax error in gpib.py

if !hasattr -> if not hasattr