Safe dictionary retrieval
This commit is contained in:
parent
c16872531e
commit
2891265409
|
|
@ -175,7 +175,7 @@ class Installer:
|
||||||
|
|
||||||
for mountpoint in sorted(mountpoints.keys()):
|
for mountpoint in sorted(mountpoints.keys()):
|
||||||
log(f"Mounting {mountpoint} to {self.target}{mountpoint}", level=logging.INFO)
|
log(f"Mounting {mountpoint} to {self.target}{mountpoint}", level=logging.INFO)
|
||||||
if mountpoints[mountpoint]['encrypted']:
|
if mountpoints[mountpoint].get('encrypted', False):
|
||||||
loopdev = storage.get('ENC_IDENTIFIER', 'ai') + 'loop'
|
loopdev = storage.get('ENC_IDENTIFIER', 'ai') + 'loop'
|
||||||
if not (password := mountpoints[mountpoint].get('!password', None)):
|
if not (password := mountpoints[mountpoint].get('!password', None)):
|
||||||
raise RequirementError(f"Missing mountpoint {mountpoint} encryption password in layout: {mountpoints[mountpoint]}")
|
raise RequirementError(f"Missing mountpoint {mountpoint} encryption password in layout: {mountpoints[mountpoint]}")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue