mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
build_library: Fix getting integer from string
`string.atoi` was deprecated since at least the first release of python2, and looks like it was dropped in python3.
This commit is contained in:
parent
ea0f478cfa
commit
a314348a38
@ -11,7 +11,7 @@ filename = sys.argv[1]
|
|||||||
grubdir = sys.argv[2]
|
grubdir = sys.argv[2]
|
||||||
outputdir = sys.argv[3]
|
outputdir = sys.argv[3]
|
||||||
version = sys.argv[4]
|
version = sys.argv[4]
|
||||||
bootoffset = string.atoi(subprocess.check_output(['cgpt', 'show', '-i', '2', '-b', filename])) * 512
|
bootoffset = int(subprocess.check_output(['cgpt', 'show', '-i', '2', '-b', filename])) * 512
|
||||||
with open(filename, "rb") as f:
|
with open(filename, "rb") as f:
|
||||||
boot = f.read(440)
|
boot = f.read(440)
|
||||||
f.seek(bootoffset)
|
f.seek(bootoffset)
|
||||||
|
Loading…
Reference in New Issue
Block a user