Merge branch 'master' into include-subscription-info

This commit is contained in:
Karol Wypchło 2022-03-04 14:09:38 +01:00 committed by GitHub
commit cf2ea28802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ api_endpoint = "http://{}:{}".format(
# find siad api password by getting it out of the docker container # find siad api password by getting it out of the docker container
def get_api_password(): def get_api_password():
if os.getenv("SIA_API_PASSWORD"):
return os.getenv("SIA_API_PASSWORD")
api_password_regex = re.compile(r"^\w+$") api_password_regex = re.compile(r"^\w+$")
docker_cmd = "docker exec {} cat /sia-data/apipassword".format(CONTAINER_NAME) docker_cmd = "docker exec {} cat /sia-data/apipassword".format(CONTAINER_NAME)
output = subprocess.check_output(docker_cmd, shell=True).decode("utf-8") output = subprocess.check_output(docker_cmd, shell=True).decode("utf-8")