This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
     new 0ba86ea  [DATALAB-2091]: changed create_aws_config_files
0ba86ea is described below

commit 0ba86eaffb8a45efe9432587a6001ad83e53b2cc
Author: leonidfrolov <[email protected]>
AuthorDate: Mon Apr 5 16:43:41 2021 +0300

    [DATALAB-2091]: changed create_aws_config_files
---
 infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index bfed3cd..1535c40 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -1499,8 +1499,8 @@ def get_gitlab_cert(bucket, certfile):
 def create_aws_config_files(generate_full_config=False):
     try:
         aws_user_dir = os.environ['AWS_DIR']
-        subprocess.run("rm -rf " + aws_user_dir + " 2>&1", 
capture_output=True, shell=True, check=True)
-        subprocess.run("mkdir -p " + aws_user_dir + " 2>&1", 
capture_output=True, shell=True, check=True)
+        subprocess.run("rm -rf " + aws_user_dir + " 2>&1", shell=True, 
check=True)
+        subprocess.run("mkdir -p " + aws_user_dir + " 2>&1", shell=True, 
check=True)
 
         with open(aws_user_dir + '/config', 'w') as aws_file:
             aws_file.write("[default]\n")
@@ -1512,9 +1512,9 @@ def create_aws_config_files(generate_full_config=False):
                 aws_file.write("aws_access_key_id = 
{}\n".format(os.environ['aws_access_key']))
                 aws_file.write("aws_secret_access_key = 
{}\n".format(os.environ['aws_secret_access_key']))
 
-        subprocess.run("chmod 600 " + aws_user_dir + "/*" + " 2>&1", 
capture_output=True, shell=True, check=True)
-        subprocess.run("chmod 550 " + aws_user_dir + " 2>&1", 
capture_output=True, shell=True, check=True)
-        subprocess.run("cat " + aws_user_dir + "/credentials", 
capture_output=True, shell=True, check=True)
+        subprocess.run("chmod 600 " + aws_user_dir + "/*" + " 2>&1", 
shell=True, check=True)
+        subprocess.run("chmod 550 " + aws_user_dir + " 2>&1", shell=True, 
check=True)
+        subprocess.run("cat " + aws_user_dir + "/credentials", shell=True, 
check=True)
         return True
     except Exception as err:
         print('Error: {0}'.format(err))

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to