Fix installing static media for extensions.
Review Request #13198 — Created Aug. 9, 2023 and submitted
The recent work to move Djblets over to the modern Python
importlib.metadatamodules regressed the
installation of extension static media. When checking if a resource
exists, we were using
.is_file(), which only returns
Trueif it's af
file and not a directory. This failed on the
This change switches this to a call to
.exists(), fixing static media
Unit tests were added to ensure this doesn't break in the future.
Unit test pass.
Deployed this fix to reviews.reviewboard.org and fixed static media
installation for Power Pack.