deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: EC2: Raise an 404 exception when trying to access non-existing instance
Date Thu, 16 Feb 2012 12:32:05 GMT
Updated Branches:
  refs/heads/master 58372c1d2 -> f147e9f36


EC2: Raise an 404 exception when trying to access non-existing instance


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f147e9f3
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f147e9f3
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f147e9f3

Branch: refs/heads/master
Commit: f147e9f360ae276544081d2d1419188e64423d89
Parents: 58372c1
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Feb 16 13:31:51 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Feb 16 13:31:51 2012 +0100

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f147e9f3/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 4569056..74e110f 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -184,6 +184,7 @@ module Deltacloud
           inst_arr = []
           safely do
             ec2_inst = ec2.describe_instances([opts[:id]]).first
+            raise "Instance #{opts[:id]} NotFound" if ec2_inst.nil?
             instance = convert_instance(ec2_inst)
             return nil unless instance
             if ec2_inst[:aws_platform] == 'windows'


Mime
View raw message