Skip to content

Commit 6eec4a3

Browse files
Copilotasadali145
andauthored
fix: use files(__package__) instead of files(__name__) for resource loading
Agent-Logs-Url: https://github.com/mitodl/edx-sga/sessions/45039174-a75e-49f7-904b-03920ef8b1ee Co-authored-by: asadali145 <52656433+asadali145@users.noreply.github.com>
1 parent 950d5ca commit 6eec4a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

edx_sga/sga.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,15 +1039,15 @@ def _resource(path): # pragma: NO COVER
10391039
"""
10401040
Handy helper for getting resources from our kit.
10411041
"""
1042-
data = files(__name__).joinpath(path).read_bytes()
1042+
data = files(__package__).joinpath(path).read_bytes()
10431043
return data.decode("utf8")
10441044

10451045

10461046
def load_resource(resource_path): # pragma: NO COVER
10471047
"""
10481048
Gets the content of a resource
10491049
"""
1050-
resource_content = files(__name__).joinpath(resource_path).read_bytes()
1050+
resource_content = files(__package__).joinpath(resource_path).read_bytes()
10511051
return str(resource_content.decode("utf8"))
10521052

10531053

0 commit comments

Comments
 (0)