summaryrefslogtreecommitdiff
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
parent18774e2e797f64cf951b3ba1ea8051ea6ad525f4 (diff)
Fix local import
-rw-r--r--backend/__pycache__/config.cpython-39.pycbin413 -> 426 bytes
-rw-r--r--backend/endpoints/get_plist.py8
2 files changed, 5 insertions, 3 deletions
diff --git a/backend/__pycache__/config.cpython-39.pyc b/backend/__pycache__/config.cpython-39.pyc
index 92c0291..662d54d 100644
--- a/backend/__pycache__/config.cpython-39.pyc
+++ b/backend/__pycache__/config.cpython-39.pyc
Binary files differ
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: