python/samba/provision: PY3 PY3 port samba4.blackbox.provision-backend
authorNoel Power <noel.power@suse.com>
Wed, 10 Oct 2018 11:25:09 +0000 (12:25 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Oct 2018 03:50:29 +0000 (05:50 +0200)
Enclose filter with list as filter object has no 'len' method

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/provision/backend.py

index e46e3e86ba128cb5df456e8385472db56beeae29..005c15392e86f6cac018caf3c40a8f6bbd468698 100644 (file)
@@ -403,7 +403,7 @@ class OpenLDAPBackend(LDAPBackend):
             # For now, make these equal
             mmr_pass = self.ldapadminpass
 
             # For now, make these equal
             mmr_pass = self.ldapadminpass
 
-            url_list = filter(None, self.ol_mmr_urls.split(','))
+            url_list = list(filter(None, self.ol_mmr_urls.split(',')))
             for url in url_list:
                 self.logger.info("Using LDAP-URL: " + url)
             if len(url_list) == 1:
             for url in url_list:
                 self.logger.info("Using LDAP-URL: " + url)
             if len(url_list) == 1: