fac
fac copied to clipboard
Update loop stops on first held mod that is updatable
Held mods update block uses break where it should use continue like the unpacked block.
if not args.held and local_mod.name in self.config.hold:
print("%s is held. "
"Use -H to update it anyway." %
local_mod.name)
break
The above should use break like the on below does. Links above link to the relevant lines.
if not args.unpacked and not local_mod.packed:
print(
"%s is unpacked. "
"Use -U to update it anyway." % (
local_mod.name
)
)
continue
It's the last line in the for loop, so it doesn't need a continue. Removing the line entirely seems fine.
Really, I suppose the answer is to break up the function.
I am talking about the break at line 64, not the last line (67).
The break at 64 cancels the update function on the first package that can be updated but is held.
And yes, the very last break at line 67 shouldn't be there as well as that also ends the loop prematurely.