def conn(self):
from boto.s3 import connect_to_region
from boto.s3.connection import OrdinaryCallingFormat
from baiji.config import settings
if not self._connected:
self._conn = connect_to_region(
settings.region,
aws_access_key_id=settings.key,
aws_secret_access_key=settings.secret,
calling_format=OrdinaryCallingFormat(),
suppress_consec_slashes=False)
self._connected = True
return self._conn
评论列表
文章目录