Skip to content

Commit f07f355

Browse files
committed
Minor refactor
1 parent f6da69a commit f07f355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patch-vbmeta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def patch_vbmeta(file):
2424
magic = os.read(fd, AVB_MAGIC_LEN)
2525

2626
if magic != AVB_MAGIC:
27-
fd.close()
27+
os.close(fd)
2828
sys.exit(
2929
"Error: The provided image is not a valid vbmeta image.\nFile not modified. Exiting..."
3030
)
@@ -34,7 +34,7 @@ def patch_vbmeta(file):
3434
os.lseek(fd, FLAGS_OFFSET, os.SEEK_SET)
3535
os.write(fd, FLAGS_TO_SET)
3636
except OSError:
37-
fd.close()
37+
os.close(fd)
3838
sys.exit("Error: Failed when patching the vbmeta image.\nExiting...")
3939

4040
# end of program

0 commit comments

Comments
 (0)