Index: shared/scripts/configuration/config.py =================================================================== diff -u -r9b7ef5a23854a897c674bd62c6e7be63c60b9233 -r5712621df8e57a627411ef8e6f6c19a927987c43 --- shared/scripts/configuration/config.py (.../config.py) (revision 9b7ef5a23854a897c674bd62c6e7be63c60b9233) +++ shared/scripts/configuration/config.py (.../config.py) (revision 5712621df8e57a627411ef8e6f6c19a927987c43) @@ -109,7 +109,7 @@ ALARMS_CONF_LOCATION = "".join([str(HOME_DIR_PATH),'/Projects/application/resources/settings/Alarms/Alarms.conf']) ALARM_MAPPING_CSV_FILE_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/denali/AlarmMapping.csv']) ALARM_MAPPING_CSV_DIR_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/denali/']) - +APPLICATION_FOLDER_LOCATION = "".join([str(HOME_DIR_PATH)+'/Projects/']) Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r09c151304b448aecfed8a67c28800d161018641e -r5712621df8e57a627411ef8e6f6c19a927987c43 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 09c151304b448aecfed8a67c28800d161018641e) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 5712621df8e57a627411ef8e6f6c19a927987c43) @@ -21,11 +21,13 @@ import object import sys import squish +import shutil import time import test from builtins import format from builtins import str as pyStr from builtins import int as pyInt +from dialin.ui import utils from configuration import config from dialin.ui import utils from dialin.utils import * @@ -1179,10 +1181,8 @@ def get_extracted_error_file(): """ - This function is the handler for getting error file from service folder. - + This function is the handler for getting error file from service folder. Application log file is automatically created on '/home/denali/Desktop/sd-card/service/ {current_date}_denaliSquish.err ' - @return latest_file - (string) returns latest file that append on log folder from service """ try: @@ -1193,5 +1193,37 @@ return False raise LookupError("value object is not in view to the user after trying 100 times") + +def rename_file(path,filename): + """ + This method Rename the original folder name to dummy name. + """ + folder_path = os.listdir(path) + for files in folder_path: + if files == filename+"_1": + if os.path.exists(path+filename+"_1"): + shutil.rmtree(path+filename+"_1") + test.log(str(filename+" name changed to "+files)) + if files == filename: + if os.path.exists(path+filename): + utils.waitForGUI(1) + os.rename(path+filename,path+filename+"_1") + test.log(str(files+" name changed to "+filename+"_1")) +def rename_old_name(path,filename): + """ + This method Rename the dummy name to original folder name . + """ + folder_path = os.listdir(path) + for files in folder_path: + if files == filename: + if os.path.exists(path+filename): + shutil.rmtree(path+filename) + test.log(str(files+"_1 name changed to "+filename)) + utils.waitForGUI(5) + if files != filename: + if (files == filename+"_1"): + os.rename(path+files,path+filename) + test.log(str(files+" name changed to "+filename)) +