Skip to content

Instantly share code, notes, and snippets.

@belek
Created February 23, 2017 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save belek/5a5e97846dfe325b2ca259a88128d4d7 to your computer and use it in GitHub Desktop.
Save belek/5a5e97846dfe325b2ca259a88128d4d7 to your computer and use it in GitHub Desktop.
django_minio post: Connection
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