Skip to content

Commit 0e010cc

Browse files
committed
attempt bug fix
1 parent 56ced5d commit 0e010cc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

datajoint/autopopulate.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ def handler(signum, frame):
222222
make_kwargs=make_kwargs,
223223
)
224224

225-
if processes == 1:
225+
if processes < 0:
226+
raise Exception("processes must not be negative")
227+
elif processes == 0:
228+
return None
229+
elif processes == 1:
226230
for key in (
227231
tqdm(keys, desc=self.__class__.__name__) if display_progress else keys
228232
):
@@ -252,8 +256,7 @@ def handler(signum, frame):
252256
if reserve_jobs:
253257
signal.signal(signal.SIGTERM, old_handler)
254258

255-
if suppress_errors:
256-
return error_list
259+
return error_list, nkeys
257260

258261
def _populate1(
259262
self, key, jobs, suppress_errors, return_exception_objects, make_kwargs=None

0 commit comments

Comments
 (0)