Skip to content

Commit

Permalink
修正获取插件路径的函数调用
Browse files Browse the repository at this point in the history
  • Loading branch information
Gawah committed Nov 22, 2023
1 parent 52c6ac6 commit c989b23
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 182 deletions.
4 changes: 2 additions & 2 deletions backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import subprocess
import glob
import os
from helpers import get_homebrew_path,get_home_path,get_user
from helpers import get_homebrew_path

#日志配置
try:
Expand All @@ -18,7 +18,7 @@

#路径配置
try:
HOMEBREW_PATH = get_homebrew_path(get_home_path(get_user()))
HOMEBREW_PATH = get_homebrew_path()
SH_PATH="{}/plugins/PowerControl/backend/sh_tools.sh".format(HOMEBREW_PATH)
RYZENADJ_PATH="{}/plugins/PowerControl/bin/ryzenadj".format(HOMEBREW_PATH)
GPU_DEVICE_PATH = glob.glob("/sys/class/drm/card?/device")[0]
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#获取插件路径 加载backend中各个py文件
try:
from helpers import get_homebrew_path,get_home_path,get_user
HOMEBREW_PATH = get_homebrew_path(get_home_path(get_user()))
from helpers import get_homebrew_path
HOMEBREW_PATH = get_homebrew_path()
sys.path.append("{}/plugins/PowerControl/backend".format(HOMEBREW_PATH))
from config import logging
from gpu import gpuManager
Expand Down
Loading

0 comments on commit c989b23

Please sign in to comment.