can't you have else:
instead of elif not HAVE_H5PY: