From: Michael Tremer Date: Thu, 9 Dec 2021 10:47:53 +0000 (+0000) Subject: disk: Set PARTITION_ESP if unset X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8389ba03cf4282e19fd1b124333325f29e50621;p=people%2Fms%2Fbricklayer.git disk: Set PARTITION_ESP if unset On Debian Bullseye which I have been using for developing Bricklayer, PARTITION_ESP is suddenly non-existant. parted still knows this parameter which is why we try to set this manually as a fallback. Signed-off-by: Michael Tremer --- diff --git a/src/python/disk.py b/src/python/disk.py index aea063a..f56fe40 100644 --- a/src/python/disk.py +++ b/src/python/disk.py @@ -33,6 +33,12 @@ log = logging.getLogger("bricklayer.disk") DEFAULT_FILESYSTEM = "btrfs" +# Check if parted.PARTITION_ESP is set +try: + parted.PARTITION_ESP +except AttributeError: + parted.PARTITION_ESP = 18 + class Disks(object): """ Disks abstraction class