Don't explode if we're unable to load extension entrypoint metadata.
Review Request #12480 — Created July 20, 2022 and submitted — Latest diff uploaded
In certain pathological cases related to in-progress upgrades of a
server, we may get into a situation where an entrypoint appears to
exist, but attempting to load it gives us empty metadata. Most of the
extension info code is written to handle when the metadata dict is
empty, but we were basing the htdocs path for media on whatever the
Namewas, which would end up attempting to pass in
os.path.join(). This change updates it so we use the
extension ID as a fallback if the Name doesn't exist in the metadata.
Ran unit tests.