tests/rodc_rwdc: p.communicate() gives bytes, not str
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 15 Feb 2019 21:48:00 +0000 (10:48 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 4 Mar 2019 21:41:17 +0000 (21:41 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/tests/python/rodc_rwdc.py

index 3596c7d750acff983f32bdff12c470816fa2f5e4..c2c41634b8c5f117d516e5b634808ee824d472f6 100644 (file)
@@ -88,7 +88,7 @@ def set_auto_replication(dc, allow):
                              stdout=subprocess.PIPE)
         stdout, stderr = p.communicate()
         if p.returncode:
-            if 'LDAP_REFERRAL' not in stderr:
+            if b'LDAP_REFERRAL' not in stderr:
                 raise RodcRwdcTestException()
             print("ignoring +%s REFERRAL error; assuming %s is RODC" %
                   (opt, dc))