Skip to content

Commit

Permalink
Merge "Use utils.safe_minidom_parse_string in extensions"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Aug 8, 2013
2 parents 370c700 + 4ad95db commit 957685e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cinder/api/contrib/backups.py
Expand Up @@ -18,7 +18,6 @@

import webob
from webob import exc
from xml.dom import minidom

from cinder.api import common
from cinder.api import extensions
Expand All @@ -28,6 +27,7 @@
from cinder import backup as backupAPI
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import utils


LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -82,7 +82,7 @@ def construct(self):

class CreateDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
dom = minidom.parseString(string)
dom = utils.safe_minidom_parse_string(string)
backup = self._extract_backup(dom)
return {'body': {'backup': backup}}

Expand All @@ -101,7 +101,7 @@ def _extract_backup(self, node):

class RestoreDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
dom = minidom.parseString(string)
dom = utils.safe_minidom_parse_string(string)
restore = self._extract_restore(dom)
return {'body': {'restore': restore}}

Expand Down
6 changes: 3 additions & 3 deletions cinder/api/contrib/volume_transfer.py
Expand Up @@ -17,7 +17,6 @@

import webob
from webob import exc
from xml.dom import minidom

from cinder.api import common
from cinder.api import extensions
Expand All @@ -28,6 +27,7 @@
from cinder import exception
from cinder.openstack.common import log as logging
from cinder import transfer as transferAPI
from cinder import utils

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -62,7 +62,7 @@ def construct(self):

class CreateDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
dom = minidom.parseString(string)
dom = utils.safe_minidom_parse_string(string)
transfer = self._extract_transfer(dom)
return {'body': {'transfer': transfer}}

Expand All @@ -80,7 +80,7 @@ def _extract_transfer(self, node):

class AcceptDeserializer(wsgi.MetadataXMLDeserializer):
def default(self, string):
dom = minidom.parseString(string)
dom = utils.safe_minidom_parse_string(string)
transfer = self._extract_transfer(dom)
return {'body': {'accept': transfer}}

Expand Down

0 comments on commit 957685e

Please sign in to comment.