Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tusd: Attempt to derive S3 region.
Alex Vandiver9c043c6c14cf
diff --git a/zerver/management/commands/runtusd.py b/zerver/management/commands/runtusd.pyindex 9a660a7e2b0..6d4630ba7a5 100644--- a/zerver/management/commands/runtusd.py+++ b/zerver/management/commands/runtusd.py@@ -63,6 +63,10 @@ class Command(BaseCommand):env_vars["AWS_ACCESS_KEY_ID"] = settings.S3_KEYif settings.S3_SECRET_KEY is not None:env_vars["AWS_SECRET_ACCESS_KEY"] = settings.S3_SECRET_KEY- assert settings.S3_REGION is not None- env_vars["AWS_REGION"] = settings.S3_REGION+ if settings.S3_REGION is None:+ import boto3++ env_vars["AWS_REGION"] = boto3.client("s3").meta.region_name+ else:+ env_vars["AWS_REGION"] = settings.S3_REGIONos.execvpe("tusd", tusd_args, env_vars)