Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic error in encrypt() loop #2207

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions archinstall/lib/luks.py
Original file line number Diff line number Diff line change
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