From 88a0d79873742fe2df8fdf9898df6f4fc56c2475 Mon Sep 17 00:00:00 2001 From: Luke Rohde Date: Tue, 28 Jul 2015 16:02:49 -0400 Subject: [PATCH] Use msg kwarg to pass error message in ec2_snapshot --- cloud/amazon/ec2_snapshot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/amazon/ec2_snapshot.py b/cloud/amazon/ec2_snapshot.py index ee9d5ab1110..41dc4bdb21a 100644 --- a/cloud/amazon/ec2_snapshot.py +++ b/cloud/amazon/ec2_snapshot.py @@ -146,9 +146,9 @@ def main(): state = module.params.get('state') if not volume_id and not instance_id and not snapshot_id or volume_id and instance_id and snapshot_id: - module.fail_json('One and only one of volume_id or instance_id or snapshot_id must be specified') + module.fail_json(msg='One and only one of volume_id or instance_id or snapshot_id must be specified') if instance_id and not device_name or device_name and not instance_id: - module.fail_json('Instance ID and device name must both be specified') + module.fail_json(msg='Instance ID and device name must both be specified') ec2 = ec2_connect(module)