Fix test failure under Python 3.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/db86d135 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/db86d135 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/db86d135 Branch: refs/heads/trunk Commit: db86d13519405b72c771bb4c5d62e3017be98db2 Parents: e263208 Author: Tomaz Muraus <[email protected]> Authored: Thu Dec 26 17:24:04 2013 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Thu Dec 26 17:52:35 2013 +0100 ---------------------------------------------------------------------- libcloud/compute/drivers/ec2.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/db86d135/libcloud/compute/drivers/ec2.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py index 80b204f..bc9377f 100644 --- a/libcloud/compute/drivers/ec2.py +++ b/libcloud/compute/drivers/ec2.py @@ -2718,9 +2718,12 @@ class BaseEC2NodeDriver(NodeDriver): xpath='output', namespace=NAMESPACE) + timestamp = parse_date(timestamp) + output = base64.b64decode(b(encoded_string)).decode('utf-8') + return {'instance_id': node.id, - 'timestamp': parse_date(timestamp), - 'output': base64.b64decode(b(encoded_string))} + 'timestamp': timestamp, + 'output': output} def _get_common_security_group_params(self, group_id, protocol, from_port, to_port, cidr_ips,
