summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>2012-02-02 15:01:49 +0000
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>2012-02-21 00:05:45 +0000
commit880cde716e673a829b6e352116a039588f42d2b9 (patch)
tree497bf3d7157eb77648fc8a1e5a88deb3d7cfa7de
parent55547ca785587ddc810119f3eb15ff009200fa86 (diff)
downloadpython-neutronclient-880cde716e673a829b6e352116a039588f42d2b9.tar.gz
Bug 921930
remove depedency on webob from python-quantumclient Rebased and repushed after review expired Change-Id: I7dc3840018f3496116d30c2684bc44f64fa2752b
-rw-r--r--quantum/common/exceptions.py4
-rw-r--r--quantum/common/serializer.py5
-rw-r--r--setup.py1
-rw-r--r--tools/pip-requires1
4 files changed, 7 insertions, 4 deletions
diff --git a/quantum/common/exceptions.py b/quantum/common/exceptions.py
index 2171ede..f4cf55e 100644
--- a/quantum/common/exceptions.py
+++ b/quantum/common/exceptions.py
@@ -130,6 +130,10 @@ class MalformedRequestBody(QuantumException):
message = _("Malformed request body: %(reason)s")
+class MalformedResponseBody(QuantumException):
+ message = _("Malformed response body: %(reason)s")
+
+
class Duplicate(Error):
pass
diff --git a/quantum/common/serializer.py b/quantum/common/serializer.py
index b596cf8..da50c64 100644
--- a/quantum/common/serializer.py
+++ b/quantum/common/serializer.py
@@ -1,6 +1,6 @@
from xml.dom import minidom
-import webob.exc
+from quantum.common import exceptions as exception
from quantum.common import utils
@@ -41,7 +41,8 @@ class Serializer(object):
try:
return self.get_deserialize_handler(content_type)(datastring)
except Exception:
- raise webob.exc.HTTPBadRequest("Could not deserialize data")
+ raise exception.MalformedResponseBody(
+ reason="Unable to deserialize response body")
def get_deserialize_handler(self, content_type):
handlers = {
diff --git a/setup.py b/setup.py
index f0bacfd..aa924d3 100644
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,6 @@ requires = [
'Paste',
'PasteDeploy',
'python-gflags',
- 'webob'
]
EagerResources = [
diff --git a/tools/pip-requires b/tools/pip-requires
index dbc78c3..4b44750 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -4,7 +4,6 @@
Paste
PasteDeploy==1.5.0
python-gflags==1.3
-WebOb==1.0.8
distribute>=0.6.24