summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-10-25 09:25:51 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-10-25 09:47:49 +0200
commit64f1f5403e014a944e70187e6eda9a02c08eac3e (patch)
tree0fb537e8b014b1a332003c7b77f5a8f8c6ed0e46 /src/utils
parent7874323d46aa4012569d93b8577dea9ae502229d (diff)
disk: use different log message in get_disk_data and get_partition_data
Use a more specific message to differentiate the source of the error. Add the target device to the log message.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/disk.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/disk.py b/src/utils/disk.py
index 2af1462..0ba38dc 100644
--- a/src/utils/disk.py
+++ b/src/utils/disk.py
@@ -35,7 +35,7 @@ def get_partition_data(device):
try:
cxt = fdisk.Context(device=device, details=True)
except Exception as e:
- raise OgError(f'Partition query error: {e}') from e
+ raise OgError(f'Partition query error for {device}: {e}') from e
for i, p in enumerate(cxt.partitions):
pd = ogPartitionData(
@@ -51,7 +51,7 @@ def get_disk_data(device):
try:
cxt = fdisk.Context(device=device, details=True)
except Exception as e:
- raise OgError(f'Partition query error: {e}') from e
+ raise OgError(f'Disk query error for {device}: {e}') from e
return ogDiskData(
nsectors = cxt.nsectors,
sector_size = cxt.sector_size,