This is the output of the test program. Note that the backtrace about
NoneType is normal (coding error due to my ignorance of how to do things
perfectly in twisted).


$ python test-txaws-ipaddress.py ami-9666e9a6
i-e5269ad6
Mon Aug  6 16:32:33 2012: polling ec2...
Mon Aug  6 16:32:33 2012: polling ec2...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/policies.py", line 
123, in connectionLost
    self.wrappedProtocol.connectionLost(reason)
  File "/usr/lib/python2.7/dist-packages/twisted/web/client.py", line 191, in 
connectionLost
    self.factory._disconnectedDeferred.callback(None)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 362, 
in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 458, 
in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, 
in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "test-txaws-ipaddress.py", line 69, in describeInstances
    d = ec2.describe_instances(instance_id)
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 45, in 
describe_instances
    d = query.submit()
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 976, in 
submit
    self.sign()
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 969, in sign
    self.params["Signature"] = self.signature.compute()
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 1022, in 
compute
    bytes = self.signing_text()
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 1041, in 
signing_text
    self.get_canonical_query_params())
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 1048, in 
get_canonical_query_params
    result.append("%s=%s" % (self.encode(key), self.encode(value)))
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 1059, in 
encode
    return quote(string, safe="~")
  File "/usr/lib/python2.7/urllib.py", line 1255, in quote
    raise TypeError('None object cannot be quoted')
exceptions.TypeError: None object cannot be quoted
Mon Aug  6 16:32:43 2012: polling ec2...
Mon Aug  6 16:32:53 2012: polling ec2...
Mon Aug  6 16:33:04 2012: polling ec2...
Mon Aug  6 16:33:15 2012: polling ec2...
dns_name = ec2-54-245-9-232.us-west-2.compute.amazonaws.com
ip_address = 54.245.9.232
private_dns_name = ip-10-248-27-120.us-west-2.compute.internal
private_ip_address = 10.248.27.120
[('i-e5269ad6', 'running', 'shutting-down')]

When run on precise w/o this backport, ip_address will = None

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/945176

Title:
  Support privateIpAddress and ipAddress

To manage notifications about this bug go to:
https://bugs.launchpad.net/precise-backports/+bug/945176/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to