Wrong variable name in usage
This commit is contained in:
parent
e30290aee0
commit
1fdb64858c
|
|
@ -143,6 +143,7 @@ def get_arguments():
|
||||||
"""
|
"""
|
||||||
config = {}
|
config = {}
|
||||||
args, unknowns = parser.parse_known_args()
|
args, unknowns = parser.parse_known_args()
|
||||||
|
|
||||||
# preprocess the json files.
|
# preprocess the json files.
|
||||||
# TODO Expand the url access to the other JSON file arguments ?
|
# TODO Expand the url access to the other JSON file arguments ?
|
||||||
if args.config is not None:
|
if args.config is not None:
|
||||||
|
|
@ -175,6 +176,7 @@ def get_arguments():
|
||||||
# avoiding a compatibility issue
|
# avoiding a compatibility issue
|
||||||
if 'dry-run' in config:
|
if 'dry-run' in config:
|
||||||
del config['dry-run']
|
del config['dry-run']
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
def load_config():
|
def load_config():
|
||||||
|
|
|
||||||
|
|
@ -123,12 +123,11 @@ class Filesystem:
|
||||||
else:
|
else:
|
||||||
loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['device_instance'].path).name}"
|
loopdev = f"{storage.get('ENC_IDENTIFIER', 'ai')}{pathlib.Path(partition['device_instance'].path).name}"
|
||||||
|
|
||||||
print(storage['arguments'])
|
|
||||||
partition['device_instance'].encrypt(
|
partition['device_instance'].encrypt(
|
||||||
password=partition['!password'],
|
password=partition['!password'],
|
||||||
key_size=storage['arguments']['crypt-key-size'],
|
key_size=storage['arguments']['crypt_key_size'],
|
||||||
hash_type=storage['arguments']['crypt-hash-type'],
|
hash_type=storage['arguments']['crypt_hash_type'],
|
||||||
iter_time=storage['arguments']['crypt-iter-time']
|
iter_time=storage['arguments']['crypt_iter_time']
|
||||||
)
|
)
|
||||||
# Immediately unlock the encrypted device to format the inner volume
|
# Immediately unlock the encrypted device to format the inner volume
|
||||||
with luks2(partition['device_instance'], loopdev, partition['!password'], auto_unmount=True) as unlocked_device:
|
with luks2(partition['device_instance'], loopdev, partition['!password'], auto_unmount=True) as unlocked_device:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue