Fix compatibility of 3.8

This commit is contained in:
mio
2024-09-26 23:02:03 +08:00
parent d568885d64
commit 91122b6a68

View File

@@ -98,13 +98,13 @@ def __load_uc_lib() -> ctypes.CDLL:
canonicals.append(
resources.files("unicorn") / 'lib'
)
except ImportError:
except:
try:
import pkg_resources
canonicals.append(
pkg_resources.resource_filename("unicorn", 'lib')
)
except ImportError:
except:
# maybe importlib_resources, but ignore for now
pass