def execute_client(threadName, config): relevant_path = config["pathToSharedFolder"] if os.path.exists(relevant_path + "temp/"): shutil.rmtree(relevant_path + "temp/") delete_extensions = ["track", "temp", "txt", "jpg", "pdf"] deleteFilesList = [fn for fn in os.listdir(relevant_path) if any(fn.endswith(ext) for ext in delete_extensions)] for f in deleteFilesList: os.remove(relevant_path + f) client_module(socket, config)
def execute_client( threadName, config): relevant_path = config["pathToSharedFolder"] if os.path.exists(relevant_path+"temp/"): shutil.rmtree(relevant_path+"temp/") delete_extensions = ['track','temp','txt','jpg','pdf'] deleteFilesList = [fn for fn in os.listdir(relevant_path) if any(fn.endswith(ext) for ext in delete_extensions)] for f in deleteFilesList: os.remove(relevant_path + f) client_module(socket, config)