Skip to content

Commit

Permalink
Fix logic error in encrypt() loop (#2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles committed Nov 9, 2023
1 parent c9755b3 commit 9404681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions archinstall/lib/luks.py
Expand Up @@ -90,14 +90,14 @@ def encrypt(
# 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:
Expand Down

0 comments on commit 9404681

Please sign in to comment.