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-11-09 06:47:30 -0500
committerGitHub <noreply@github.com>2023-11-09 12:47:30 +0100
commit940468117a64ecc493bde62bd7f27dc9642e976a (patch)
treef7957339402df83a0ab3fb6a1967e0f7a4da00c1
parentc9755b35e7364d208d836ec051d365354be6dd63 (diff)
Fix logic error in `encrypt()` loop (#2207)
-rw-r--r--archinstall/lib/luks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py
index ea09ae7c..4b3b3bc7 100644
--- a/archinstall/lib/luks.py
+++ b/archinstall/lib/luks.py
@@ -90,14 +90,14 @@ class Luks2:
# Retry formatting the volume because archinstall can some times be too quick
# which generates a "Device /dev/sdX does not exist or access denied." between
# setting up partitions and us trying to encrypt it.
- for retry_attempt in range(storage['DISK_RETRY_ATTEMPTS']):
+ for retry_attempt in range(storage['DISK_RETRY_ATTEMPTS'] + 1):
try:
SysCommand(cryptsetup_args)
break
except SysCallError as err:
time.sleep(storage['DISK_TIMEOUTS'])
- if retry_attempt != storage['DISK_RETRY_ATTEMPTS'] - 1:
+ if retry_attempt != storage['DISK_RETRY_ATTEMPTS']:
continue
if err.exit_code == 1: