diff options
author | jmallen <jmallen@gmail.com> | 2011-08-03 13:09:48 -0300 |
---|---|---|
committer | Mitch Garnaat <mitch@garnaat.com> | 2011-08-03 14:02:36 -0400 |
commit | 7aba9173fbe147e99d7a9722cc9cd53f2d942ab5 (patch) | |
tree | 34f25f4598a596ea6394f1b97595e1e229d3882b | |
parent | 9e339d319491faeeddb4fabe15372bdc55d1ecf0 (diff) | |
download | boto-7aba9173fbe147e99d7a9722cc9cd53f2d942ab5.tar.gz |
The current EC2 api, if given the Tag.n.Value parameter the empty string, will only delete it if the tag's value is the empty string. The intended behavior is to delete the tag regardless of the value. In this use case, no Value parameter should be sent to EC2.
-rw-r--r-- | boto/ec2/connection.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/boto/ec2/connection.py b/boto/ec2/connection.py index 466c3e20..d7aabde2 100644 --- a/boto/ec2/connection.py +++ b/boto/ec2/connection.py @@ -2385,9 +2385,8 @@ class EC2Connection(AWSQueryConnection): for key in keys: value = tags[key] params['Tag.%d.Key'%i] = key - if value is None: - value = '' - params['Tag.%d.Value'%i] = value + if value is not None: + params['Tag.%d.Value'%i] = value i += 1 def get_all_tags(self, filters=None): |