boto/utils.py makes use of boto.provider, but doesn't import it

Bug #947424 reported by Dave Walker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-boto (Ubuntu)
Fix Released
Medium
Dave Walker

Bug Description

This is really a dupe of bug 945355, but they plan to work around it, rather than fix it within boto.

I'm seeing issues where:

provider = boto.provider.get_default()

is called, but it isn't imported:
...
File "/usr/lib/python2.7/dist-packages/boto/utils.py", line 91, in canonical_string
provider = boto.provider.get_default()
AttributeError: 'module' object has no attribute 'provider'
...

Adding an import of boto.provider into boto/utils.py resolves this issue.

Thanks.

This is easily reproduced with:

  $ python -c 'import boto.utils; boto.utils.get_aws_metadata({})'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/boto/utils.py", line 159, in get_aws_metadata
    provider = boto.provider.get_default()
AttributeError: 'module' object has no attribute 'provider'

Revision history for this message
Scott Moser (smoser) wrote :
description: updated
Dave Walker (davewalker)
Changed in python-boto (Ubuntu):
assignee: nobody → Dave Walker (davewalker)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-boto - 2.2.2-0ubuntu2

---------------
python-boto (2.2.2-0ubuntu2) precise; urgency=low

  * Switch to dpkg-source 3.0 (quilt) format
  * debian/patches/import-boto-provider.patch: New patch that resolves issue
    of boto/utils.py making calls to function boto.provider, without importing
    it. LP: #947424
 -- Dave Walker (Daviey) <email address hidden> Mon, 05 Mar 2012 20:51:38 +0000

Changed in python-boto (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.