File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1250,15 +1250,16 @@ def __init__(
12501250 Initializes the requests object.
12511251
12521252 If `requests_lists` is given as argument, assumes they are sorted by request type
1253- ascending, starting from 0.
1253+ ascending, starting from 0 and contiguous - including empty entries .
12541254 """
12551255 if requests_lists is not None :
12561256 assert len (requests ) == 0 , "requests must be empty if list is provided"
12571257 self .requests_list = []
12581258 for type , requests_list in enumerate (requests_lists ):
1259- self .requests_list .append (
1260- Bytes (bytes ([type ]) + requests_list_to_bytes (requests_list ))
1261- )
1259+ if requests_list :
1260+ self .requests_list .append (
1261+ Bytes (bytes ([type ]) + requests_list_to_bytes (requests_list ))
1262+ )
12621263 return
12631264 else :
12641265 lists : Dict [int , List [RequestBase ]] = defaultdict (list )
You can’t perform that action at this time.
0 commit comments