Skip to content

Commit

Permalink
Fixes suggested by JayPipes review. Did not modify docstrings in non-…
Browse files Browse the repository at this point in the history
…related files.
  • Loading branch information
Christopher MacGown committed Jan 12, 2011
1 parent 3095add commit 14ca119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions glance/store/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
# 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
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"

Expand Down Expand Up @@ -86,7 +86,7 @@ def delete(cls, parsed_uri, conn_class=None):

@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:
Expand All @@ -97,7 +97,7 @@ def _get_bucket(cls, conn, bucket_id):

@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:
Expand All @@ -106,5 +106,5 @@ def _get_key(cls, bucket, obj):

@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)
2 changes: 1 addition & 1 deletion glance/store/swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

from __future__ import absolute_import
import glance.store
import swift.common.client


class SwiftBackend(glance.store.Backend):
Expand Down Expand Up @@ -117,5 +116,6 @@ def _parse_swift_tokens(cls, parsed_uri):

def get_connection_class(conn_class):
if not conn_class:
import swift.common.client
conn_class = swift.common.client.Connection
return conn_class

0 comments on commit 14ca119

Please sign in to comment.