You should provide an error message:

    raise AutodetectionFailure('Could not autodetect environment.')