From e3ce8e0e4b4ad4b8936e7955e689b63403d6c701 Mon Sep 17 00:00:00 2001 From: twm2016 Date: Thu, 10 Mar 2016 13:26:31 -0600 Subject: [PATCH] Strip "\n" character from result domain-create command never succeed when the backend is NSD4. "self._command(command)" returns not "ok" but "ok\n". Result is now stripped of the "\n" character Closes-Bug: #1537688 Change-Id: Iddd4f4abc1cdd116f8b7b1e50dcff134c6f2214b --- designate/backend/impl_nsd4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designate/backend/impl_nsd4.py b/designate/backend/impl_nsd4.py index d868264c9..5dcb5475c 100644 --- a/designate/backend/impl_nsd4.py +++ b/designate/backend/impl_nsd4.py @@ -72,7 +72,7 @@ class NSD4Backend(base.Backend): except (ssl.SSLError, socket.error) as e: LOG.debug('NSD4 control call failure: %s' % e) raise exceptions.Backend(e) - if result != 'ok': + if result.rstrip("\n") != 'ok': raise exceptions.Backend(result) def create_zone(self, context, zone):