docker – Problemas obtniendo exception en python

Tengo un pequeño problema con a la hora de recoger una excepción de un subporcess.run en excepciones anidadas.

    subprocess.run(
        "docker run --rm -t --log-driver json-file --log-opt tag='docker:{0!s}' --name  {1!s} -e {2!s} {3!s}".format(
            name_log, name_container, sys.argv(5), sys.argv(8)), shell=True, check=True)


    if container and container.status == "running":
        print("Failure to execute because the container is running")
        level = "WARNING"
        state = "OK"
        event = "Failure to execute because the container is running"
        duration = elapsed_time
        logging.warning(template(timestamp, level, computer, project, application, state, duration, env, event))

    else:
        print("Normal execution")
        state = "OK"
        level = "INFO"
        duration = elapsed_time
        filename = sys.argv(4)
        filePath = "/home/dacq/repo/centralizacion/contadores_{0}.txt".format(filename)
        if os.path.exists(filePath):
            os.remove(filePath)
        logging.info(template(timestamp, level, computer, project, application, state, duration, env, event))

except Exception as event:
    print("Firts except")

except subprocess.SubprocessError as error:
    print("Last except")

no logro entrar en el ultimo except y este es el error que me devuelve el subprocess:

docker: Error response from daemon: Conflict. The container name “/ubuntu” is already in use by container “a9d2c971ce4ebabcad57fd37894f7747f16533113599b6690dd85cac46761780”. You have to remove (or rename) that container to be able to reuse that name.