Commits

Felipe Martín committed 24ae8cb

Updated host/port defaults matching @k4ml suggestion

  • Participants
  • Parent commits d3c408e
  • Branches custom_host

Comments (0)

Files changed (1)

storages/backends/s3boto.py

         'application/x-javascript',
     ))
     url_protocol = setting('AWS_S3_URL_PROTOCOL', 'http:')
-    host = setting('AWS_S3_HOST', None)
+    host = setting('AWS_S3_HOST', S3Connection.DefaultHost)
     use_ssl = setting('AWS_S3_USE_SSL', True)
     port = setting('AWS_S3_PORT', None)
 
     @property
     def connection(self):
         if self._connection is None:
-            if self.host is None:
-                # Using real Amazon S3 server
-                self._connection = self.connection_class(
-                    self.access_key,
-                    self.secret_key,
-                    is_secure=self.use_ssl,
-                    calling_format=self.calling_format
-                )
-            else:
-                # Using custom S3 server
-                self._connection = self.connection_class(
-                    self.access_key,
-                    self.secret_key,
-                    is_secure=self.use_ssl,
-                    calling_format=self.calling_format,
-                    host=self.host,
-                    port=self.port
-                )
+            self._connection = self.connection_class(
+                self.access_key,
+                self.secret_key,
+                is_secure=self.use_ssl,
+                calling_format=self.calling_format,
+                host=self.host,
+                port=self.port,
+            )
         return self._connection
 
     @property