File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -2203,9 +2203,16 @@ def _expand_bundled_jobs(self, scheduler_jobs):
2203
2203
bundle_prefix = self ._bundle_prefix
2204
2204
for job in scheduler_jobs :
2205
2205
if job .name ().startswith (bundle_prefix ):
2206
- with open (self ._fn_bundle (job .name ())) as file :
2207
- for line in file :
2208
- yield ClusterJob (line .strip (), job .status ())
2206
+ bundle_name = self ._fn_bundle (job .name ())
2207
+ # Ensure that the bundle exists in this project before yielding
2208
+ # jobs from it. This check is necessary because scheduler jobs
2209
+ # with the same prefix could exist, submitted by other
2210
+ # FlowProjects with the same name from this user or other
2211
+ # users. See https://github.com/glotzerlab/signac-flow/issues/758
2212
+ if os .path .exists (bundle_name ):
2213
+ with open (bundle_name ) as file :
2214
+ for line in file :
2215
+ yield ClusterJob (line .strip (), job .status ())
2209
2216
else :
2210
2217
yield job
2211
2218
You can’t perform that action at this time.
0 commit comments