Fixes suggested by JayPipes review. Did not modify docstrings in non-related files.

This commit is contained in:
Christopher MacGown
2011-01-12 22:03:54 +01:00
parent 3095add3b4
commit 14ca119e29
2 changed files with 6 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
""" the s3 backend adapter """
"""the s3 backend adapter"""
from __future__ import absolute_import
import glance.store
@@ -23,7 +23,7 @@ import boto.s3.connection
class S3Backend(glance.store.Backend):
""" An implementation of the s3 adapter. """
"""An implementation of the s3 adapter."""
EXAMPLE_URL = "s3://ACCESS_KEY:SECRET_KEY@s3_url/bucket/file.gz.0"
@@ -86,7 +86,7 @@ class S3Backend(glance.store.Backend):
@classmethod
def _get_bucket(cls, conn, bucket_id):
""" Get a bucket from an s3 connection """
"""Get a bucket from an s3 connection"""
bucket = conn.get_bucket(bucket_id)
if not bucket:
@@ -97,7 +97,7 @@ class S3Backend(glance.store.Backend):
@classmethod
def _get_key(cls, bucket, obj):
""" Get a key from a bucket """
"""Get a key from a bucket"""
key = bucket.get_key(obj)
if not key:
@@ -106,5 +106,5 @@ class S3Backend(glance.store.Backend):
@classmethod
def _parse_s3_tokens(cls, parsed_uri):
""" Parse tokens from the parsed_uri """
"""Parse tokens from the parsed_uri"""
return glance.store.parse_uri_tokens(parsed_uri, cls.EXAMPLE_URL)

View File

@@ -17,7 +17,6 @@
from __future__ import absolute_import
import glance.store
import swift.common.client
class SwiftBackend(glance.store.Backend):
@@ -117,5 +116,6 @@ class SwiftBackend(glance.store.Backend):
def get_connection_class(conn_class):
if not conn_class:
import swift.common.client
conn_class = swift.common.client.Connection
return conn_class