deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/6] git commit: Core: Return 404 instead of exception when accessing non-existing driver in drivers collection
Date Tue, 07 Feb 2012 10:12:20 GMT
Core: Return 404 instead of exception when accessing non-existing driver in drivers collection


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

Branch: refs/heads/master
Commit: 3e46de11d6f51e279ca2293565c8f2eef83a20ec
Parents: f66b594
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Feb 1 14:38:38 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Feb 7 11:13:06 2012 +0100

----------------------------------------------------------------------
 server/lib/deltacloud/server.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3e46de11/server/lib/deltacloud/server.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
index 9801d60..57b7daa 100644
--- a/server/lib/deltacloud/server.rb
+++ b/server/lib/deltacloud/server.rb
@@ -167,7 +167,7 @@ EOS
         @providers = driver.providers(credentials)  if driver.respond_to? :providers
       end
       @driver = settings.drivers[@name]
-      return [404, "Driver #{@name} not found"] unless @driver
+      halt 404 unless @driver
       respond_to do |format|
         format.xml { haml :"drivers/show" }
         format.json { @driver.to_json }


Mime
View raw message