Skip to content

Commit

Permalink
chore: replace importlib with loader.load_unicode of Xblock
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBhatti committed Sep 10, 2024
1 parent e3bb34a commit 18cf504
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions image_explorer/image_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import textwrap
from io import StringIO
from urllib.parse import urljoin
import importlib.resources

from django.conf import settings
from lxml import etree, html
Expand Down Expand Up @@ -465,5 +464,4 @@ def workbench_scenarios():

def resource_string(self, path):
"""Handy helper for getting resources from our kit."""
data = importlib.resources.files(__package__).joinpath(path)
return data.read_text(encoding="utf-8")
return loader.load_unicode(path)

0 comments on commit 18cf504

Please sign in to comment.