tests: handle - in the sfdisk version test
When a `-` is in the version (meaning a version such as: `2.38-rc1`), take only the part before the dash. This closes #1036.
This commit is contained in:
parent
16b187f5d9
commit
ce9253788e
1 changed files with 4 additions and 0 deletions
|
|
@ -33,6 +33,10 @@ def have_sfdisk_with_json():
|
|||
|
||||
data = r.stdout.strip()
|
||||
vstr = data.split(" ")[-1]
|
||||
|
||||
if "-" in vstr:
|
||||
vstr = vstr.split("-")[0]
|
||||
|
||||
ver = list(map(int, vstr.split(".")))
|
||||
return ver[0] >= 2 and ver[1] >= 27
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue