Skip to content

Commit 3e40e71

Browse files
committed
fix comment and put an assert
1 parent 0e6fef7 commit 3e40e71

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

py/dynesty/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,7 @@ def restore_sampler(fname, pool=None):
21482148
f'({DYNESTY_VERSION}). That is *NOT* guaranteed to work')
21492149

21502150
queue_size_old = getattr(sampler, 'queue_size', None)
2151+
assert queue_size_old is not None # I don't think it could ever happen
21512152
try:
21522153
# we first try to get the new queue_size
21532154
# that may fail if the pool has no information about the size
@@ -2240,7 +2241,7 @@ def _parse_pool_queue(pool, queue_size):
22402241
if queue_size is None:
22412242
raise ValueError(
22422243
"Cannot initialize `queue_size` because "
2243-
"`pool.size` or pool._processes has not been provided. "
2244-
"Please `define `pool.size` or specify `queue_size` "
2244+
"`pool.size` or `pool._processes` has not been provided. "
2245+
"Please define `pool.size` or specify `queue_size` "
22452246
"explicitly.")
22462247
return mapper, queue_size

0 commit comments

Comments
 (0)