From aafed6b95943d2004f9871a3c86525b44fea2843 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Fri, 22 Sep 2023 21:08:57 +0300 Subject: [PATCH] syscalls: fix default table path --- src/openpower/syscalls/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py index c59b47a8..68bef552 100644 --- a/src/openpower/syscalls/__init__.py +++ b/src/openpower/syscalls/__init__.py @@ -1,5 +1,4 @@ import ctypes -import functools import inspect import json import pathlib @@ -73,8 +72,7 @@ class UnknownSyscall(Syscall): class Dispatcher: def __init__(self, guest, host, logger=None, table=None): if table is None: - path = pathlib.Path(inspect.getfile(self.__class__)) - path = (path.parent / "syscalls.json") + path = (pathlib.Path(__file__).parent / "syscalls.json") with open(path, "r", encoding="UTF-8") as stream: table = json.load(stream) if not isinstance(table, dict): -- 2.30.2