

def _get_access_keys(self):
    access_key = getattr(settings, ACCESS_KEY_NAME, None)
    secret_key = getattr(settings, SECRET_KEY_NAME, None)
    if ((access_key or secret_key) and ((not access_key) or (not secret_key))):
        access_key = os.environ.get(ACCESS_KEY_NAME)
        secret_key = os.environ.get(SECRET_KEY_NAME)
    if (access_key and secret_key):
        return (access_key, secret_key)
    return (None, None)

dataset/ETHPy150Open kylemacfarlane/django-cb-storage-s3/src/cuddlybuddly/storage/s3/storage.py S3Storage._get_access_keys/original