~soren/boto/boto.no_wait_on_404

  • Committer: Soren Hansen
  • Date: 2009-09-08 09:00:48 UTC
  • Revision ID: soren@canonical.com-20090908090048-rlbbhf6h4okus7aw
Attempting to fetch userdata will hang for a very long time if the user has not
provided any userdata.

This is because retry_url treats a 404 (which is a valid response meaning that
the user did not provide any userdata) like a network error (which usually
means that the network has not come up yet, or that that user- and meta-data
service is not available yet.

This patch adds a retry_on_404 kwarg to retry_url. If True (which is the
default) retry_url will do what it used to do. If False, it will treat 404 as a
valid response and return ''. Defaulting to True is rather conservative as I
suspect that this new behaviour is desired in most cases, but I'll leave that
decision to you.

Bug first reported as:

    https://bugs.launchpad.net/ubuntu/+source/python-boto/+bug/419306
Filename Latest Rev Last Changed Committer Comment Size
..
bin 777 14 years ago kopertop Moved s3put to "bin" directory. Added a sdbadmin Diff
boto 1 16 years ago Mitch.Garnaat Tag Bolivia_0 release Diff
dist 1 16 years ago Mitch.Garnaat Tag Bolivia_0 release Diff
doc 1 16 years ago Mitch.Garnaat Tag Bolivia_0 release Diff
File cq.py 1 16 years ago Mitch.Garnaat Tag Bolivia_0 release 2.7 KB Diff Download File
README 797 14 years ago Mitch.Garnaat Bumping for new version. 2 KB Diff Download File
setup.py 836 14 years ago kopertop Added an elb admin command line tool, updated sdba 2.3 KB Diff Download File