Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-10-31 12:57:59 -0400
committerGitHub <noreply@github.com>2023-10-31 17:57:59 +0100
commit5b6cab27f10bffa343eeff573b2bf90262da634b (patch)
tree78539241e5c1b4346b6cd3b53407addeff22bbd7
parent2831c97338ca3b60dc1c697d158cd3f6281746d7 (diff)
Fix logic error in `_fetch_lsblk_info()` loop (#2196)
-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)