Brad Anderson wrote:
Hi all,
I had a couple of old environments hanging around my trac_env path, and they
didn't react well for the setup_sibling_environments, which I believe is part
of the InterTrac which was recently merged.
I was able to pinpoint the offenders by adding to the try/except as such:
try:
siblings[project] = get_environment(None, options)
except (TracError, IOError):
pass
except:
raise TracError("sibling environment error for %s" % project)
I don't know if this is something that should stay or not, but for me, it
found the old env. When it was deleted, everything worked fine.
I think that's fine. I didn't propagate the TracError, because this
usually corresponds
to "upgrade needed" conditions, as well as the IOError, which usually
corresponds
to things that are not Trac environments but are present in the
TRAC_ENV_PARENT_DIR.
I think it's safe to ignore those errors here, as they will be shown in
the index and
they usually correspond to a "normal" state of affairs (those
environments have not
yet been upgraded for some reason, that other directory is there for
reason, etc.)
But if there are other kind of errors, maybe it's better to abort early
and fix those
errors, as you did.
On a related note, I was thinking about extending TRAC_ENV so that it would
accept a _list_ of environment paths (e.g. envpath1:envpath2:envpath3).
That would make it possible for mod_python to handle environment in
multiple
unrelated paths, like tracd can do.
-- Christian
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev