summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/main.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/main.py b/backend/main.py
index afd3cc21..99e6c618 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -17,7 +17,7 @@ basicConfig(level=CONFIG["log_level"], format="[%(module)s][%(levelname)s]: %(me
from asyncio import get_event_loop, sleep
from json import dumps, loads
from os import path
-from subprocess import Popen
+from subprocess import call
import aiohttp_cors
from aiohttp.web import Application, run_app, static
@@ -31,8 +31,10 @@ from utilities import Utilities
logger = getLogger("Main")
async def chown_plugin_dir(_):
- Popen(["chown", "-R", "deck:deck", CONFIG["plugin_path"]])
- Popen(["chmod", "-R", "555", CONFIG["plugin_path"]])
+ code_chown = call(["chown", "-R", "deck:deck", 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:
def __init__(self) -> None: