From d0584e8c202ca14e022f57524b3c037648d6d3d1 Mon Sep 17 00:00:00 2001 From: "Hughes, Alexander (ah8742)" Date: Tue, 28 May 2019 13:52:36 -0500 Subject: [PATCH] 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 --- pegleg/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pegleg/cli.py b/pegleg/cli.py index 02d11cd1..2f1f12a2 100644 --- a/pegleg/cli.py +++ b/pegleg/cli.py @@ -714,7 +714,7 @@ def decrypt(*, path, save_location, overwrite, site_name): click.echo(value) else: 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) files.write(file_save_location, value) os.chmod(file_save_location, 0o600)