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
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 python2. 7/dist- packages/ twisted/ protocols/ policies. py", line 123, in connectionLost wrappedProtocol .connectionLost (reason) python2. 7/dist- packages/ twisted/ web/client. py", line 191, in connectionLost factory. _disconnectedDe ferred. callback( None) python2. 7/dist- packages/ twisted/ internet/ defer.py" , line 362, in callback _startRunCallba cks(result) python2. 7/dist- packages/ twisted/ internet/ defer.py" , line 458, in _startRunCallbacks _runCallbacks( ) python2. 7/dist- packages/ twisted/ internet/ defer.py" , line 545, in _runCallbacks current. result, *args, **kw) ipaddress. py", line 69, in describeInstances instances( instance_ id) python2. 7/dist- packages/ txaws/ec2/ client. py", line 45, in describe_instances python2. 7/dist- packages/ txaws/ec2/ client. py", line 976, in submit python2. 7/dist- packages/ txaws/ec2/ client. py", line 969, in sign params[ "Signature" ] = self.signature. compute( ) python2. 7/dist- packages/ txaws/ec2/ client. py", line 1022, in compute python2. 7/dist- packages/ txaws/ec2/ client. py", line 1041, in signing_text get_canonical_ query_params( )) python2. 7/dist- packages/ txaws/ec2/ client. py", line 1048, in get_canonical_ query_params append( "%s=%s" % (self.encode(key), self.encode( value)) ) python2. 7/dist- packages/ txaws/ec2/ client. py", line 1059, in encode python2. 7/urllib. py", line 1255, in quote TypeError: None object cannot be quoted 245-9-232. us-west- 2.compute. amazonaws. com 27-120. us-west- 2.compute. internal
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/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
--- <exception caught here> ---
File "/usr/lib/
current.result = callback(
File "test-txaws-
d = ec2.describe_
File "/usr/lib/
d = query.submit()
File "/usr/lib/
self.sign()
File "/usr/lib/
self.
File "/usr/lib/
bytes = self.signing_text()
File "/usr/lib/
self.
File "/usr/lib/
result.
File "/usr/lib/
return quote(string, safe="~")
File "/usr/lib/
raise TypeError('None object cannot be quoted')
exceptions.
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-
ip_address = 54.245.9.232
private_dns_name = ip-10-248-
private_ip_address = 10.248.27.120
[('i-e5269ad6', 'running', 'shutting-down')]
When run on precise w/o this backport, ip_address will = None