Skip to content

Commit

Permalink
Use shell=False in subprocess Function Calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeebot[bot] authored Jul 25, 2024
1 parent b4b0c7e commit 003ae5c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
bitops_hosts = bitops_hosts[0]
print("Waiting for host:", bitops_hosts)
wait_for_command = "{}/_scripts/ansible/wait-for-it.sh -h {} -p {} -t {}".format(TEMPDIR,bitops_hosts,port,timeout)
result = subprocess.call(wait_for_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.call(wait_for_command, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except yaml.YAMLError as exception:
print(exception)
except IOError:
print("Terraform inventory file not found. Skipping wait for hosts.")
print("Terraform inventory file not found. Skipping wait for hosts.")

0 comments on commit 003ae5c

Please sign in to comment.