Skip to content

Commit 8b8f52f

Browse files
committed
Use resource_string function from galaxy.util
1 parent 1eeb3a0 commit 8b8f52f

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

planemo/reports/build_report.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import base64
22

33
from galaxy.util import strip_control_characters
4+
from galaxy.util.resources import resource_string
45
from jinja2 import (
56
Environment,
67
PackageLoader,
78
)
8-
from pkg_resources import resource_string
99

1010
TITLE = "Results (powered by Planemo)"
1111

@@ -130,14 +130,10 @@ def __inject_summary(environment):
130130

131131

132132
def __style(filename):
133-
resource = __load_resource(filename)
133+
resource = resource_string(__name__, filename)
134134
return "<style>%s</style>" % resource
135135

136136

137137
def __script(short_name):
138-
resource = __load_resource("%s.js" % short_name)
138+
resource = resource_string(__name__, "%s.js" % short_name)
139139
return "<script>%s</script>" % resource
140-
141-
142-
def __load_resource(name):
143-
return resource_string(__name__, name).decode("UTF-8")

0 commit comments

Comments
 (0)