reduce use of pkg_resources by not extracting a file to find its filename
Further progress on #4467
This commit is contained in:
parent
2e65f731b1
commit
0a9cfaa35a
|
|
@ -118,8 +118,7 @@ class Environment(jinja2.Environment):
|
|||
def _data_url(self, path: str) -> str:
|
||||
"""Get a data: url for the broken qutebrowser logo."""
|
||||
data = utils.read_file(path, binary=True)
|
||||
filename = utils.resource_filename(path)
|
||||
mimetype = utils.guess_mimetype(filename)
|
||||
mimetype = utils.guess_mimetype(path)
|
||||
return urlutils.data_url(mimetype, data).toString()
|
||||
|
||||
def getattr(self, obj: Any, attribute: str) -> Any:
|
||||
|
|
|
|||
Loading…
Reference in New Issue