Skip to content

Commit 8383315

Browse files
fix: Handle missing SSL context in multiprocess populate
When use_tls=False, the connection doesn't have an SSL context (ctx), so check if it exists before trying to delete it. Fixes #1374 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5a78063 commit 8383315

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/datajoint/autopopulate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ def handler(signum, frame):
525525
else:
526526
# spawn multiple processes
527527
self.connection.close()
528-
del self.connection._conn.ctx # SSLContext is not pickleable
528+
if hasattr(self.connection._conn, "ctx"):
529+
del self.connection._conn.ctx # SSLContext is not pickleable
529530
with (
530531
mp.Pool(processes, _initialize_populate, (self, self.jobs, populate_kwargs)) as pool,
531532
tqdm(desc="Processes: ", total=nkeys)

0 commit comments

Comments
 (0)