problem was caused by change in python behavior, now hasattr(val, attr) only suppresses attribute exceptions.