Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce that the random site selection always works on a list object. #2260

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions ganga/GangaDirac/Lib/Splitters/OfflineGangaDiracSplitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from GangaDirac.Lib.Utilities.DiracUtilities import execute, GangaDiracError
from GangaCore.Core.GangaThread.WorkerThreads import getQueues
from GangaDirac.Lib.Files.DiracFile import DiracFile
from copy import deepcopy
import random
import time
import math
Expand Down Expand Up @@ -127,7 +126,7 @@ def find_random_site(original_SE_list, banned_SE):
original_SE_list (list): This is a list of given 'SE'. The same SE may appear more than once!
banned_SE (list): This is a list of SE which are 'banned' from being selected
"""
input_list = deepcopy(original_SE_list)
input_list = list(original_SE_list)
chosen_element = ""

while chosen_element == "" and len(input_list) > 0:
Expand Down