diff options
author | Cerberus <matt.dietz@rackspace.com> | 2010-09-29 16:21:28 -0500 |
---|---|---|
committer | Cerberus <matt.dietz@rackspace.com> | 2010-09-29 16:21:28 -0500 |
commit | 128ec65cf39e74b53903dd9788a58c8eb513abe8 (patch) | |
tree | 9c3323c87d41d5e5e631d097e4a3235d1df591d2 /nova/wsgi.py | |
parent | 9c4319a83a6e7d61ffa6b78e9f17ea35821c5526 (diff) | |
download | nova-128ec65cf39e74b53903dd9788a58c8eb513abe8.tar.gz nova-128ec65cf39e74b53903dd9788a58c8eb513abe8.tar.xz nova-128ec65cf39e74b53903dd9788a58c8eb513abe8.zip |
Server creation up to, but not including, network configuration
Diffstat (limited to 'nova/wsgi.py')
-rw-r--r-- | nova/wsgi.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nova/wsgi.py b/nova/wsgi.py index 48c4dabc2..b91d91121 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -281,10 +281,13 @@ class Serializer(object): The string must be in the format of a supported MIME type. """ datastring = datastring.strip() - is_xml = (datastring[0] == '<') - if not is_xml: - return json.loads(datastring) - return self._from_xml(datastring) + try: + is_xml = (datastring[0] == '<') + if not is_xml: + return json.loads(datastring) + return self._from_xml(datastring) + except: + return None def _from_xml(self, datastring): xmldata = self.metadata.get('application/xml', {}) |