summaryrefslogtreecommitdiff
path: root/backend/endpoints/get_plist.py
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-04-02 19:50:51 -0700
committerLouie S <louie@example.com>2023-04-02 19:54:48 -0700
commit27ca872db30aaa59bea67f0ac0cfb441497b1ec7 (patch)
tree5b956a5d6b6e234fe817ee76203b100709a2741b /backend/endpoints/get_plist.py
parent18774e2e797f64cf951b3ba1ea8051ea6ad525f4 (diff)
Fix local import
Diffstat (limited to 'backend/endpoints/get_plist.py')
-rw-r--r--backend/endpoints/get_plist.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/endpoints/get_plist.py b/backend/endpoints/get_plist.py
index 76275b7..cfa56bf 100644
--- a/backend/endpoints/get_plist.py
+++ b/backend/endpoints/get_plist.py
@@ -2,8 +2,10 @@ import json
import logging
import os
import plistlib
+import sys
-from ..config import Config
+sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
+from config import Config
output = dict()
output["paths"] = []
@@ -11,13 +13,13 @@ output["paths"] = []
def find_plist(path):
with os.scandir(path) as it:
for entry in it:
- if entry.name == "." or entry.name == "..":
+ if entry.name == "." or entry.name == ".." or entry.name == "Resources":
continue
if(os.DirEntry.is_dir(entry)):
find_plist(path + "/" + entry.name)
elif(entry.name == "Info.plist"):
#parse_plist(path + "/" + entry.name)
- output["paths"] += path + "/" + entry.name
+ output["paths"].append(path + "/" + entry.name)
def parse_plist(path):
with open(path, "rb") as fp: