From 74f1d8ab8905b9d9384697be63aefa052432851a Mon Sep 17 00:00:00 2001 From: Artem Yushev <12692378+ayushev@users.noreply.github.com> Date: Fri, 7 Jun 2019 12:36:08 +0200 Subject: [PATCH] Update SetupAWS.py --- scripts/aws_config_quick_start/SetupAWS.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/aws_config_quick_start/SetupAWS.py b/scripts/aws_config_quick_start/SetupAWS.py index 3b88be4..85edde2 100644 --- a/scripts/aws_config_quick_start/SetupAWS.py +++ b/scripts/aws_config_quick_start/SetupAWS.py @@ -39,19 +39,17 @@ def prereq(): # Store certId cert_id = result['certificateId'] cert_id_filename = thing_name + '_cert_id_file' - os.chmod(cert_id_file_path, 0o444) cert_id_file = open(cert_id_filename, 'w') + os.chmod(os.path.abspath(cert_id_filename), 0o444) cert_id_file.write(cert_id) - cert_id_file_path = os.path.abspath(cert_id_filename) cert_id_file.close() # Store cert_pem as file cert_pem = result['certificatePem'] cert_pem_filename = thing_name + '_cert_pem_file' - os.chmod(cert_pem_file_path, 0o444) cert_pem_file = open(cert_pem_filename, 'w') + os.chmod(os.path.abspath(cert_pem_filename), 0o444) cert_pem_file.write(cert_pem) - cert_pem_file_path = os.path.abspath(cert_pem_filename) cert_pem_file.close() # Create a Policy if doesn't exist