PyJobTransforms.trfAMI: improve handling of pyAMI.exception.Error exceptions
Follows from !76577 (merged). In the case that getAMIClient or get_ami_tag throws an
exception and the two specific cases are not found a general TransformAMIException
should be thrown rather than letting the job fail with an UnboundLocalError when
it tries to access a non-existent variable. Also remove obsolete debug message.