Fallback to importlib_resources on python 3.6

This commit is contained in:
Kovid Goyal
2021-02-19 18:02:15 +05:30
parent c2a924a5ea
commit dbc1ade5a9
4 changed files with 16 additions and 4 deletions
+4 -1
View File
@@ -197,5 +197,8 @@ def resolve_custom_file(path: str) -> str:
def read_kitty_resource(name: str) -> bytes:
from importlib.resources import read_binary
try:
from importlib.resources import read_binary
except ImportError:
from importlib_resources import read_binary # type: ignore
return read_binary('kitty', name)