Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk/device_model.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index cd955851..15e68116 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -1106,10 +1106,7 @@ def _fetch_lsblk_info(dev_path: Optional[Union[Path, str]] = None, retry: int =
if not dev_path:
dev_path = ''
- if retry == 0:
- retry = 1
-
- for retry_attempt in range(retry):
+ for retry_attempt in range(retry + 1):
try:
result = SysCommand(f'lsblk --json -b -o+{lsblk_fields} {dev_path}').decode()
break
@@ -1121,7 +1118,7 @@ def _fetch_lsblk_info(dev_path: Optional[Union[Path, str]] = None, retry: int =
else:
raise err
- if retry_attempt == retry - 1:
+ if retry_attempt == retry:
raise err
time.sleep(1)