Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix gs connection #54

Closed
wants to merge 2 commits into from

Conversation

patgmiller
Copy link

The S3BotoStorage class is overriding connection variables, this causes subclasses to use s3.amazonaws.com as the host connection and fail authentication.

Also reordered Storage class so it finds the overridden get_available_name instead of the one for super class.

@patgmiller
Copy link
Author

@jschneier have you looked at this yet? Is there anything you would like me to do in order to get it accepted?

@jschneier
Copy link
Owner

Hi @patgmiller I understand the issue but this fix doesn't seem to actually use many of the AWS_* settings anymore, thus shattering backwards compat. Maybe what we need is to override the @property connection.

@patgmiller
Copy link
Author

@jschneier would you then prefer something more like this?

@deconstructible
class GoogleStorage(S3BotoStorage): 

    @property
    def connection(self):
        if self._connection is None:
            self._connection = self.connection_class(
                self.access_key, self.secret_key,
                calling_format=self.calling_format,
            )
        return self._connection

@dcgoss
Copy link
Contributor

dcgoss commented Mar 1, 2016

@patgmiller @jschneier I opened issue #124 not realizing it was a duplicate of this issue. My PR #125 should resolve the problem, in only one line.

@jschneier
Copy link
Owner

Closed in favor of #125 (thanks both @dcgoss and @patgmiller)

@jschneier jschneier closed this Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants