[elbe-devel] [PATCH] hdimg: don't use private _ped package
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Feb 9 11:43:19 CET 2024
This is an implementation details for the libparted python bindings.
The alias has been available since at least 2009.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/hdimg.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index cc0d4d22..5c976b2c 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -6,8 +6,6 @@ import logging
import os
from pathlib import Path
-import _ped
-
from elbepack.filesystem import Filesystem, size_to_int
from elbepack.fstab import fstabentry, hdpart, mountpoint_dict
from elbepack.shellhelper import CommandError, chroot, do, get_command_out
@@ -320,7 +318,7 @@ def create_partition(
fs = simple_fstype('fat32')
ppart = parted.Partition(disk, ptype, fs, geometry=g)
if disk.type != 'gpt':
- ppart.setFlag(_ped.PARTITION_LBA)
+ ppart.setFlag(parted.PARTITION_LBA)
else:
ppart = parted.Partition(disk, ptype, geometry=g)
@@ -331,10 +329,10 @@ def create_partition(
disk.addPartition(ppart, cons)
if part.has('bootable'):
- ppart.setFlag(_ped.PARTITION_BOOT)
+ ppart.setFlag(parted.PARTITION_BOOT)
if part.has('biosgrub'):
- ppart.setFlag(_ped.PARTITION_BIOS_GRUB)
+ ppart.setFlag(parted.PARTITION_BIOS_GRUB)
return ppart
--
2.43.0
More information about the elbe-devel
mailing list