Add additional error code case of when to handle updating trust.
Also, wrap p4 trust -y -f call in exception handler. For whatever reason, this occasionally will update the trust but return an error. When you do it again, the trust has already been correctly handled.