Skip to content

Commit

Permalink
Fixing Sphinx warnings and errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Taylor committed Jan 20, 2012
1 parent 5c82130 commit 2dc05cc
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 55 deletions.
42 changes: 20 additions & 22 deletions boto/cloudfront/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,46 +508,44 @@ def create_signed_url(self, url, keypair_id,
:type keypair_id: str
:param keypair_id: The keypair ID of the Amazon KeyPair used to sign
theURL. This ID MUST correspond to the private key
specified with private_key_file or
private_key_string.
theURL. This ID MUST correspond to the private key
specified with private_key_file or private_key_string.
:type expire_time: int
:param expire_time: The expiry time of the URL. If provided, the URL
will expire after the time has passed. If not
provided the URL will never expire. Format is a
unix epoch. Use time.time() + duration_in_sec.
will expire after the time has passed. If not provided the URL will
never expire. Format is a unix epoch.
Use time.time() + duration_in_sec.
:type valid_after_time: int
:param valid_after_time: If provided, the URL will not be valid until
after valid_after_time. Format is a unix
epoch. Use time.time() + secs_until_valid.
after valid_after_time. Format is a unix epoch.
Use time.time() + secs_until_valid.
:type ip_address: str
:param ip_address: If provided, only allows access from the specified
IP address. Use '192.168.0.10' for a single IP or
use '192.168.0.0/24' CIDR notation for a subnet.
IP address. Use '192.168.0.10' for a single IP or
use '192.168.0.0/24' CIDR notation for a subnet.
:type policy_url: str
:param policy_url: If provided, allows the signature to contain
wildcard globs in the URL. For example, you could
provide: 'http://example.com/media/*' and the policy
and signature would allow access to all contents of
the media subdirectory. If not specified, only
allow access to the exact url provided in 'url'.
wildcard globs in the URL. For example, you could
provide: 'http://example.com/media/\*' and the policy
and signature would allow access to all contents of
the media subdirectory. If not specified, only
allow access to the exact url provided in 'url'.
:type private_key_file: str or file object.
:param private_key_file: If provided, contains the filename of the
private key file used for signing or an open
file object containing the private key
contents. Only one of private_key_file or
private_key_string can be provided.
private key file used for signing or an open
file object containing the private key
contents. Only one of private_key_file or
private_key_string can be provided.
:type private_key_string: str
:param private_key_string: If provided, contains the private key string
used for signing. Only one of
private_key_file or private_key_string can
be provided.
used for signing. Only one of private_key_file or
private_key_string can be provided.
:rtype: str
:return: The signed URL.
Expand Down
3 changes: 1 addition & 2 deletions boto/dynamodb/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def _required_auth_capability(self):

def make_request(self, action, body='', object_hook=None):
"""
:raises: ``DynamoDBExpiredTokenError`` if the security token
expires.
:raises: ``DynamoDBExpiredTokenError`` if the security token expires.
"""
headers = {'X-Amz-Target' : '%s_%s.%s' % (self.ServiceName,
self.Version, action),
Expand Down
2 changes: 1 addition & 1 deletion boto/emr/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def run_jobflow(self, name, log_uri, ec2_keyname=None,
:param instance_groups: Optional list of instance groups to
use when creating this job.
NB: When provided, this argument supersedes num_instances
and master/slave_instance_type.
and master/slave_instance_type.
:type ami_version: str
:param ami_version: Amazon Machine Image (AMI) version to use
Expand Down
18 changes: 9 additions & 9 deletions boto/s3/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1132,15 +1132,15 @@ def get_website_configuration(self, headers=None):
:returns: A dictionary containing a Python representation
of the XML response from S3. The overall structure is:
* WebsiteConfiguration
* IndexDocument
* Suffix : suffix that is appended to request that
is for a "directory" on the website endpoint
* ErrorDocument
* Key : name of object to serve when an error occurs
* WebsiteConfiguration
* IndexDocument
* Suffix : suffix that is appended to request that
is for a "directory" on the website endpoint
* ErrorDocument
* Key : name of object to serve when an error occurs
"""
response = self.connection.make_request('GET', self.name,
query_args='website', headers=headers)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/ref/cloudformation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ cloudformation
==============

boto.cloudformation
---------------
-------------------

.. automodule:: boto.cloudformation
:members:
:undoc-members:

boto.cloudformation.stack
----------------------------
-------------------------

.. automodule:: boto.cloudformation.stack
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/ref/iam.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ boto.iam.connection
:undoc-members:

boto.iam.summarymap
-----------------
-------------------

.. automodule:: boto.iam.summarymap
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/ref/sqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ boto.sqs.regioninfo
:members:
:undoc-members:

boto.sqs.batchresults
-------------------
boto.sqs.batchresults
---------------------

.. automodule:: boto.sqs.batchresults
:members:
Expand Down
31 changes: 15 additions & 16 deletions docs/source/sqs_tut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ downloaded and installed boto.
Creating a Connection
---------------------
The first step in accessing SQS is to create a connection to the service.
There are two ways to do this in boto. The first is:
There are two ways to do this in boto. The first is::

>>> from boto.sqs.connection import SQSConnection
>>> conn = SQSConnection('<aws access key>', '<aws secret key>')
>>> from boto.sqs.connection import SQSConnection
>>> conn = SQSConnection('<aws access key>', '<aws secret key>')

At this point the variable conn will point to an SQSConnection object. In
this example, the AWS access key and AWS secret key are passed in to the
Expand All @@ -23,15 +23,15 @@ method explicitely. Alternatively, you can set the environment variables:
AWS_ACCESS_KEY_ID - Your AWS Access Key ID
AWS_SECRET_ACCESS_KEY - Your AWS Secret Access Key

and then call the constructor without any arguments, like this:
and then call the constructor without any arguments, like this::

>>> conn = SQSConnection()
>>> conn = SQSConnection()

There is also a shortcut function in the boto package, called connect_sqs
that may provide a slightly easier means of creating a connection:
that may provide a slightly easier means of creating a connection::

>>> import boto
>>> conn = boto.connect_sqs()
>>> import boto
>>> conn = boto.connect_sqs()

In either case, conn will point to an SQSConnection object which we will
use throughout the remainder of this tutorial.
Expand All @@ -40,9 +40,9 @@ Creating a Queue
----------------

Once you have a connection established with SQS, you will probably want to
create a queue. That can be accomplished like this:
create a queue. That can be accomplished like this::

>>> q = conn.create_queue('myqueue')
>>> q = conn.create_queue('myqueue')

The create_queue method will create the requested queue if it does not
exist or will return the existing queue if it does exist. There is an
Expand All @@ -51,18 +51,17 @@ controls how long a message will remain invisible to other queue readers
once it has been read (see SQS documentation for more detailed explanation).
If this is not explicitly specified the queue will be created with whatever
default value SQS provides (currently 30 seconds). If you would like to
specify another value, you could do so like this:
specify another value, you could do so like this::

>>> q = conn.create_queue('myqueue', 120)
>>> q = conn.create_queue('myqueue', 120)

This would establish a default visibility timeout for this queue of 120
seconds. As you will see later on, this default value for the queue can
also be overridden each time a message is read from the queue. If you want
to check what the default visibility timeout is for a queue:
to check what the default visibility timeout is for a queue::

>>> q.get_timeout()
30
>>>
>>> q.get_timeout()
30

Writing Messages
----------------
Expand Down

0 comments on commit 2dc05cc

Please sign in to comment.