summaryrefslogtreecommitdiff
path: root/ironic_python_agent/efi_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ironic_python_agent/efi_utils.py')
-rw-r--r--ironic_python_agent/efi_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ironic_python_agent/efi_utils.py b/ironic_python_agent/efi_utils.py
index 6f6b103c..1f28f635 100644
--- a/ironic_python_agent/efi_utils.py
+++ b/ironic_python_agent/efi_utils.py
@@ -50,6 +50,9 @@ def manage_uefi(device, efi_system_part_uuid=None):
local_path = tempfile.mkdtemp()
# Trust the contents on the disk in the event of a whole disk image.
efi_partition = disk_utils.find_efi_partition(device)
+ if efi_partition:
+ efi_partition = efi_partition['number']
+
if not efi_partition and efi_system_part_uuid:
# _get_partition returns <device>+<partition> and we only need the
# partition number
@@ -100,7 +103,7 @@ def manage_uefi(device, efi_system_part_uuid=None):
return False
except processutils.ProcessExecutionError as e:
- error_msg = ('Could not verify uefi on device %(dev)s'
+ error_msg = ('Could not verify uefi on device %(dev)s, '
'failed with %(err)s.' % {'dev': device, 'err': e})
LOG.error(error_msg)
raise errors.CommandExecutionError(error_msg)