Fix --save-location error in decrypt command
When the --save-location flag is used it attempts to keep the name of the file being decrypted, and saving it to a desired location. Previously this would cause TypeError: join() argument must be str or bytes, not 'tuple' This is resolved by grabbing the correct value from the os.path.split command. Change-Id: I9344bd07f5f8d03b50ac9fc004b79fefb024bbd6
This commit is contained in:
parent
2fa6a1a7bd
commit
d0584e8c20
|
@ -714,7 +714,7 @@ def decrypt(*, path, save_location, overwrite, site_name):
|
||||||
click.echo(value)
|
click.echo(value)
|
||||||
else:
|
else:
|
||||||
for key, value in decrypted.items():
|
for key, value in decrypted.items():
|
||||||
file_name = os.path.split(key)
|
file_name = os.path.split(key)[1]
|
||||||
file_save_location = os.path.join(save_location, file_name)
|
file_save_location = os.path.join(save_location, file_name)
|
||||||
files.write(file_save_location, value)
|
files.write(file_save_location, value)
|
||||||
os.chmod(file_save_location, 0o600)
|
os.chmod(file_save_location, 0o600)
|
||||||
|
|
Loading…
Reference in New Issue