diff --git a/constants.py b/constants.py index b7ae16a..0a2e64e 100644 --- a/constants.py +++ b/constants.py @@ -1,4 +1,5 @@ import pathlib +import sys ROOT_DIR = str(pathlib.Path.cwd()) @@ -6,7 +7,7 @@ TEMPLATE_DIR = ROOT_DIR + '/templates' # VENDOR_DIR = ROOT_DIR + '/vendor' FRAMEWORK_DIR = ROOT_DIR + '/frameworks' -BOTOCORE_DIR = ROOT_DIR + '/../lib64/python3.7/site-packages/botocore' +BOTOCORE_DIR = ROOT_DIR + '/../lib64/python'+ str(sys.version_info.major) + '.' + str(sys.version_info.minor) +'/site-packages/botocore' HTML_FOLDER = '/adminlte/aws/res' ADMINLTE_ROOT_DIR = ROOT_DIR + '/adminlte' diff --git a/services/lambda_/drivers/LambdaCommon.py b/services/lambda_/drivers/LambdaCommon.py index 5fce0d7..ab5d449 100644 --- a/services/lambda_/drivers/LambdaCommon.py +++ b/services/lambda_/drivers/LambdaCommon.py @@ -1,5 +1,6 @@ import json import os +import sys from datetime import datetime, timedelta import botocore @@ -25,8 +26,6 @@ class LambdaCommon(Evaluator): 'provided' ] - ## - # RUNTIME_PATH = os.path.join(os.environ.get("VENDOR_DIR"), 'aws/aws-sdk-php/src/data/lambda/2015-03-31/api-2.json.php') RUNTIME_PATH = _C.BOTOCORE_DIR + '/data/lambda/2015-03-31/service-2.json' CW_HISTORY_DAYS = [30, 7]