Created
February 23, 2017 20:01
-
-
Save belek/5a5e97846dfe325b2ca259a88128d4d7 to your computer and use it in GitHub Desktop.
django_minio post: Connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def connection(self): | |
if self._connection is None: | |
try: | |
self._connection = Minio( | |
self.server, self.access_key, self.secret_key, self.secure) | |
except InvalidEndpointError: | |
self._connection = None | |
return self._connection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment