mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
Use call instead of Popen (#113)
This commit is contained in:
+5
-3
@@ -17,7 +17,7 @@ basicConfig(level=CONFIG["log_level"], format="[%(module)s][%(levelname)s]: %(me
|
|||||||
from asyncio import get_event_loop, sleep
|
from asyncio import get_event_loop, sleep
|
||||||
from json import dumps, loads
|
from json import dumps, loads
|
||||||
from os import path
|
from os import path
|
||||||
from subprocess import Popen
|
from subprocess import call
|
||||||
|
|
||||||
import aiohttp_cors
|
import aiohttp_cors
|
||||||
from aiohttp.web import Application, run_app, static
|
from aiohttp.web import Application, run_app, static
|
||||||
@@ -31,8 +31,10 @@ from utilities import Utilities
|
|||||||
logger = getLogger("Main")
|
logger = getLogger("Main")
|
||||||
|
|
||||||
async def chown_plugin_dir(_):
|
async def chown_plugin_dir(_):
|
||||||
Popen(["chown", "-R", "deck:deck", CONFIG["plugin_path"]])
|
code_chown = call(["chown", "-R", "deck:deck", CONFIG["plugin_path"]])
|
||||||
Popen(["chmod", "-R", "555", CONFIG["plugin_path"]])
|
code_chmod = call(["chmod", "-R", "555", CONFIG["plugin_path"]])
|
||||||
|
if code_chown != 0 or code_chmod != 0:
|
||||||
|
logger.error(f"chown/chmod exited with a non-zero exit code (chown: {code_chown}, chmod: {code_chmod})")
|
||||||
|
|
||||||
class PluginManager:
|
class PluginManager:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user