Fix installing static media for extensions.

Review Request #13198 — Created Aug. 9, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-4.x

Reviewers

The recent work to move Djblets over to the modern Python
importlib.resources and importlib.metadata modules regressed the
installation of extension static media. When checking if a resource
exists, we were using .is_file(), which only returns True if it's af
file and not a directory. This failed on the static directory.

This change switches this to a call to .exists(), fixing static media
installation.

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.

Commits

Files

    Loading...