Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 0305113317f9e80328b139dce3f45533 > files > 28

python-quantumclient-2.1-1.fc18.src.rpm

From ed10bb095b91aace2cbd0b0a366d4facb04e5ab3 Mon Sep 17 00:00:00 2001
From: Gary Kotton <gkotton@redhat.com>
Date: Thu, 14 Feb 2013 12:04:26 +0000
Subject: [PATCH] Add exceptions messages for authentication

Fixes bug 1125137

Change-Id: Id79d11fb515a7af3b4e5cbe87bc717880fdb268b
---
 quantumclient/common/exceptions.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/quantumclient/common/exceptions.py b/quantumclient/common/exceptions.py
index 22ac67a..1df133d 100644
--- a/quantumclient/common/exceptions.py
+++ b/quantumclient/common/exceptions.py
@@ -94,7 +94,7 @@ class Unauthorized(QuantumClientException):
     """
     HTTP 401 - Unauthorized: bad credentials.
     """
-    pass
+    message = _("Unauthorized: bad credentials.")
 
 
 class Forbidden(QuantumClientException):
@@ -102,12 +102,13 @@ class Forbidden(QuantumClientException):
     HTTP 403 - Forbidden: your credentials don't give you access to this
     resource.
     """
-    pass
+    message = _("Forbidden: your credentials don't give you access to this "
+                "resource.")
 
 
 class EndpointNotFound(QuantumClientException):
     """Could not find Service or Region in Service Catalog."""
-    pass
+    message = _("Could not find Service or Region in Service Catalog.")
 
 
 class AmbiguousEndpoints(QuantumClientException):