fix some bugs
parent
e72de6acdd
commit
a495374352
3
utils.py
3
utils.py
|
@ -136,12 +136,11 @@ class sdat2img:
|
|||
with open(self.TRANSFER_LIST_FILE, 'r') as trans_list:
|
||||
# First line in transfer list is the version number
|
||||
# Second line in transfer list is the total number of blocks we expect to write
|
||||
if (version := int(trans_list.readline())) >= 2:
|
||||
if (version := int(trans_list.readline())) >= 2 and (new_blocks := int(trans_list.readline())):
|
||||
# Third line is how many stash entries are needed simultaneously
|
||||
trans_list.readline()
|
||||
# Fourth line is the maximum number of blocks that will be stashed simultaneously
|
||||
trans_list.readline()
|
||||
new_blocks = int(trans_list.readline())
|
||||
# Subsequent lines are all individual transfer commands
|
||||
yield version
|
||||
yield new_blocks
|
||||
|
|
Loading…
Reference in New Issue