Skip to content

Commit

Permalink
fix decky imports from plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
marios8543 committed Oct 26, 2023
1 parent ffe9cd8 commit d00506d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from traceback import format_exc
from os import path, environ
from signal import SIGINT, signal
from sys import exit, path as syspath
from sys import exit, path as syspath, modules as sysmodules
from typing import Any, Dict
from .localsocket import LocalSocket
from .localplatform import setgid, setuid, get_username, get_home_path
Expand Down Expand Up @@ -78,6 +78,9 @@ def _init(self):

# append the plugin's `py_modules` to the recognized python paths
syspath.append(path.join(environ["DECKY_PLUGIN_DIR"], "py_modules"))

#TODO: FIX IN A LESS CURSED WAY
sysmodules.update(sysmodules["src"].__dict__)

spec = spec_from_file_location("_", self.file)
assert spec is not None
Expand Down

0 comments on commit d00506d

Please sign in to comment.