1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-16 17:47:23 +01:00

Port boto to boto3 and fix asyncio issue in the management daemon (#2156)

Co-authored-by: Steve Hay <hay.steve@gmail.com>
This commit is contained in:
Steve Hay
2022-09-17 07:57:12 -04:00
committed by GitHub
parent 91fc74b408
commit 7cda439c80
3 changed files with 18 additions and 31 deletions

View File

@@ -121,8 +121,10 @@ def index():
no_users_exist = (len(get_mail_users(env)) == 0)
no_admins_exist = (len(get_admins(env)) == 0)
import boto.s3
backup_s3_hosts = [(r.name, r.endpoint) for r in boto.s3.regions()]
import boto3.s3
from urllib.parse import urlparse
backup_s3_hosts = [(r, f"s3.{r}.amazonaws.com") for r in boto3.session.Session().get_available_regions('s3')]
return render_template('index.html',
hostname=env['PRIMARY_HOSTNAME'],