osbuild-mpp: fix float correction
I mistakenly thought the .strip('.0') would strip off just '.0` but
in reality it strips off all instances of `.` or `0` on the end so
'4075520.0'.strip('.0') => '407552', which is clearly wrong.
This is a fixup for 5207e92.
This commit is contained in:
parent
7d73c0e741
commit
d50705249a
1 changed files with 1 additions and 1 deletions
|
|
@ -1288,7 +1288,7 @@ class ManifestFile:
|
|||
# some math that ended up converting the value to a
|
||||
# float. Just trim it off in that case.
|
||||
if res.endswith('.0'):
|
||||
res = res.strip('.0')
|
||||
res = res[0:-2]
|
||||
res = int(res)
|
||||
elif res_type == "json":
|
||||
res = json.loads(res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue