Skip to content

Commit e54dc66

Browse files
ensure we have 4 version components
1 parent 50d83b5 commit e54dc66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/inputstreamhelper/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ def parse_version(vstring):
377377
else:
378378
vnums.append(0) # default to 0 if no numeric part found
379379

380+
# ensure the version tuple always has 4 components
381+
while len(vnums) < 4:
382+
vnums.append(0)
383+
380384
if len(vnums) > 4:
381385
log(3, f"Version string {vstring} can't be interpreted! Too long.")
382386
return Version(0, 0, 0, 0)

0 commit comments

Comments
 (0)