[PATCH] Port of dsdb, dsdb_dns and samdb Python modules

Andrew Bartlett abartlet at samba.org
Thu Feb 8 21:10:24 UTC 2018

Sorry to nitpick, but why do we need the addCleanup and the tearDown?

On Thu, 2018-02-08 at 10:56 +0100, Andreas Schneider wrote:
> +    def tearDown(self):
> +        delete_force(self.samdb, self.account_dn)

At worse it doesn't do anything, but this looks wrong. 

I'm just waiting for a reply from Lumir regarding this and I can give
my review:


python: Port samdb module to Python 3 compatible form

This still has: 

+            print(password, PY3)

and is there really no common way of doing this?

+            if PY3:
+                pw = str('"' + password + '"').encode('utf-16-le')
+            else:
+                pw = unicode('"' + password.encode('utf-8') + '"', 'utf-8').encode('utf-16-le')

Thanks for your patience on this!

Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   

More information about the samba-technical mailing list