Convert old style class to new style class

This patch converts one old style class to new
style class and relplaces Exception.message with
six.text_type(Exception).

Change-Id: I84d36a92f7fbd55db44ce24b43f593be46be5ea5
This commit is contained in:
Pradeep Kumar Singh 2015-07-10 06:09:18 +05:30
parent 19d3117caa
commit e9c11e5543
2 changed files with 2 additions and 2 deletions

View File

@ -103,5 +103,5 @@ class NSD4Backend(base.Backend):
self._execute_nsd4(command)
except exceptions.Backend as e:
# If domain is already deleted, don't reraise
if "not found" not in str(e.message):
if "not found" not in six.text_type(e):
raise

View File

@ -29,7 +29,7 @@ from designate.tests import resources
from designate.backend import impl_nsd4
class NSD4ServerStub:
class NSD4ServerStub(object):
recved_command = None
response = 'ok'
keyfile = os.path.join(resources.path, 'ssl', 'nsd_server.key')