Update exit codes

This commit is contained in:
ludeeus
2020-05-27 16:41:57 +00:00
parent 5ce5735a12
commit 51639d6624
9 changed files with 25 additions and 18 deletions
+3 -2
View File
@@ -3,10 +3,11 @@ import os
from glob import glob
from scripts.helpers.manifest import get_manifest
def get_domain():
manifest = get_manifest()
return manifest.get('domain')
return manifest.get("domain")
if __name__ == "__main__":
print(get_domain())
print(get_domain())
+3 -1
View File
@@ -2,6 +2,7 @@ import json
import os
from glob import glob
def get_integration_path():
files = []
for dir, _, _ in os.walk("/tmp/addition"):
@@ -12,5 +13,6 @@ def get_integration_path():
exit(1)
return files.pop().replace("/manifest.json", "")
if __name__ == "__main__":
print(get_integration_path())
print(get_integration_path())
+2 -1
View File
@@ -3,9 +3,10 @@ import os
from glob import glob
from scripts.helpers.integration_path import get_integration_path
def get_manifest():
manifest = f"{get_integration_path()}/manifest.json"
with open(manifest, "r") as mf:
manifest = json.loads(mf.read())
return manifest or {}
return manifest or {}