From 14ca119e295e7f29f2b24d727fdcc09cb4572cb4 Mon Sep 17 00:00:00 2001 From: Christopher MacGown Date: Wed, 12 Jan 2011 22:03:54 +0100 Subject: [PATCH] Fixes suggested by JayPipes review. Did not modify docstrings in non-related files. --- glance/store/s3.py | 10 +++++----- glance/store/swift.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/glance/store/s3.py b/glance/store/s3.py index 9ba34d5e52..f23bcb1bf6 100644 --- a/glance/store/s3.py +++ b/glance/store/s3.py @@ -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) diff --git a/glance/store/swift.py b/glance/store/swift.py index f7c342cc15..68655e78bc 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -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