summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Schwartz <mfschwartz@google.com>2010-09-09 18:49:07 -0700
committerMike Schwartz <mfschwartz@google.com>2010-09-09 18:49:07 -0700
commitb4f2ae9bce9e55c47da6fbcffbcb0ed3ea28313b (patch)
tree3aadcf3b9c450fd30812af6b87932ec94ae1aaaa
parent305d1734aa78e974c10cf46836767a266763613c (diff)
downloadboto-b4f2ae9bce9e55c47da6fbcffbcb0ed3ea28313b.tar.gz
Fixed inconsistent use of debug param in StorageUri class and static factory method for this class.
-rw-r--r--boto/__init__.py6
-rwxr-xr-xboto/storage_uri.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/boto/__init__.py b/boto/__init__.py
index 533d0455..d1a00125 100644
--- a/boto/__init__.py
+++ b/boto/__init__.py
@@ -324,15 +324,15 @@ def lookup(service, name):
_aws_cache['.'.join((service,name))] = obj
return obj
-def storage_uri(uri_str, default_scheme='file', debug=False, validate=True):
+def storage_uri(uri_str, default_scheme='file', debug=0, validate=True):
"""Instantiate a StorageUri from a URI string.
:type uri_str: string
:param uri_str: URI naming bucket + optional object.
:type default_scheme: string
:param default_scheme: default scheme for scheme-less URIs.
- :type debug: bool
- :param debug: whether to enable connection-level debugging.
+ :type debug: int
+ :param debug: debug level to pass in to boto connection (range 0..2).
:type validate: bool
:param validate: whether to check for bucket name validity.
diff --git a/boto/storage_uri.py b/boto/storage_uri.py
index 29114fab..66ad572f 100755
--- a/boto/storage_uri.py
+++ b/boto/storage_uri.py
@@ -155,7 +155,7 @@ class BucketStorageUri(StorageUri):
"""
def __init__(self, scheme, bucket_name=None, object_name=None,
- debug=False):
+ debug=0):
"""Instantiate a BucketStorageUri from scheme,bucket,object tuple.
@type scheme: string
@@ -164,8 +164,8 @@ class BucketStorageUri(StorageUri):
@param bucket_name: bucket name
@type object_name: string
@param object_name: object name
- @type debug: bool
- @param debug: whether to turn on debugging on calls to this class
+ @type debug: int
+ @param debug: debug level to pass in to connection (range 0..2)
After instantiation the components are available in the following
fields: uri, scheme, bucket_name, object_name.