| Index: third_party/gsutil/boto/boto/ec2/autoscale/launchconfig.py
|
| diff --git a/third_party/gsutil/20110627/boto/boto/ec2/autoscale/launchconfig.py b/third_party/gsutil/boto/boto/ec2/autoscale/launchconfig.py
|
| similarity index 93%
|
| rename from third_party/gsutil/20110627/boto/boto/ec2/autoscale/launchconfig.py
|
| rename to third_party/gsutil/boto/boto/ec2/autoscale/launchconfig.py
|
| index 2027a0bedbae7585810b881f1a0f3bb61040234b..526f4686a03f0a3cd263d379a3cf7605b44ea092 100644
|
| --- a/third_party/gsutil/20110627/boto/boto/ec2/autoscale/launchconfig.py
|
| +++ b/third_party/gsutil/boto/boto/ec2/autoscale/launchconfig.py
|
| @@ -19,11 +19,11 @@
|
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
| # IN THE SOFTWARE.
|
|
|
| -
|
| from datetime import datetime
|
| -import base64
|
| from boto.resultset import ResultSet
|
| from boto.ec2.elb.listelement import ListElement
|
| +import boto.utils
|
| +import base64
|
|
|
| # this should use the corresponding object from boto.ec2
|
| class Ebs(object):
|
| @@ -70,7 +70,8 @@ class BlockDeviceMapping(object):
|
| self.ebs = None
|
|
|
| def __repr__(self):
|
| - return 'BlockDeviceMapping(%s, %s)' % (self.device_name, self.virtual_name)
|
| + return 'BlockDeviceMapping(%s, %s)' % (self.device_name,
|
| + self.virtual_name)
|
|
|
| def startElement(self, name, attrs, connection):
|
| if name == 'Ebs':
|
| @@ -83,7 +84,6 @@ class BlockDeviceMapping(object):
|
| elif name == 'VirtualName':
|
| self.virtual_name = value
|
|
|
| -
|
| class LaunchConfiguration(object):
|
| def __init__(self, connection=None, name=None, image_id=None,
|
| key_name=None, security_groups=None, user_data=None,
|
| @@ -150,7 +150,8 @@ class LaunchConfiguration(object):
|
| if name == 'SecurityGroups':
|
| return self.security_groups
|
| elif name == 'BlockDeviceMappings':
|
| - self.block_device_mappings = ResultSet([('member', BlockDeviceMapping)])
|
| + self.block_device_mappings = ResultSet([('member',
|
| + BlockDeviceMapping)])
|
| return self.block_device_mappings
|
| elif name == 'InstanceMonitoring':
|
| self.instance_monitoring = InstanceMonitoring(self)
|
| @@ -166,13 +167,16 @@ class LaunchConfiguration(object):
|
| elif name == 'ImageId':
|
| self.image_id = value
|
| elif name == 'CreatedTime':
|
| - self.created_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')
|
| + self.created_time = boto.utils.parse_ts(value)
|
| elif name == 'KernelId':
|
| self.kernel_id = value
|
| elif name == 'RamdiskId':
|
| self.ramdisk_id = value
|
| elif name == 'UserData':
|
| - self.user_data = base64.b64decode(value)
|
| + try:
|
| + self.user_data = base64.b64decode(value)
|
| + except TypeError:
|
| + self.user_data = value
|
| elif name == 'LaunchConfigurationARN':
|
| self.launch_configuration_arn = value
|
| elif name == 'InstanceMonitoring':
|
|
|