Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r693e05b81eb1416f2a958d64f387f55c73bacc65 -rcd5dc8c84ddb7172c22c7dfa186d8926da9f2f7e --- shared/scripts/configuration/utility.py (.../utility.py) (revision 693e05b81eb1416f2a958d64f387f55c73bacc65) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision cd5dc8c84ddb7172c22c7dfa186d8926da9f2f7e) @@ -15,15 +15,11 @@ import os import csv import test +from configuration import config from datetime import timezone from datetime import datetime - -CLOUD_CREDENTIALS_LOCATION = '/home/denali/Desktop/cloudsync/credentials' -CLOUD_SYNC_LOG_LOCATION = '/home/denali/Desktop/sd-card/cloudsync/' -PEM_FILES = ['1.pem', '2.pem', '3.pem' ] - def get_current_date_and_time_in_utc(date_format='%Y/%m/%d - %H:%M:%S'): """ Method to get current date and time. @@ -40,10 +36,10 @@ @return latest_file - (string) returns latest file that append on log folder from sd-data """ try: - os.makedirs(CLOUD_CREDENTIALS_LOCATION, exist_ok = True) + os.makedirs(config.CLOUD_CREDENTIALS_LOCATION, exist_ok = True) test.log("Directory created successfully") - for file_handler in range(len(PEM_FILES)): - path = os.path.join(CLOUD_CREDENTIALS_LOCATION, PEM_FILES[file_handler]) + for file_handler in range(len(config.PEM_FILES)): + path = os.path.join(config.CLOUD_CREDENTIALS_LOCATION, config.PEM_FILES[file_handler]) with open(path, 'w') as file_reader: pass @@ -58,7 +54,7 @@ """ try: current_date = get_current_date_and_time_in_utc(date_format = "%Y_%m_%d") - latest_file = CLOUD_SYNC_LOG_LOCATION+current_date+'_inp.buf' + latest_file = config.INP_BUF_FILE_LOCATION+current_date+'_inp.buf' return latest_file except: return False @@ -100,5 +96,4 @@ if expected_epoch_value > minimum_epoch_value and expected_epoch_value < maximum_epoch_value : return True - return False - + return False \ No newline at end of file