From d152bff66a42dadad388beebbdc78ed6c3fc15b5 Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Tue, 27 Mar 2018 16:32:39 +1300 Subject: [PATCH] selftest/hostconfig: fix ambiguous import for Python 3 Use relative path to import module within package and enable absolute import. Signed-off-by: Joe Guo --- python/samba/hostconfig.py | 4 ++-- selftest/tests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/samba/hostconfig.py b/python/samba/hostconfig.py index a66fbc23130..08fff4fdd4c 100644 --- a/python/samba/hostconfig.py +++ b/python/samba/hostconfig.py @@ -16,8 +16,8 @@ # """Local host configuration.""" - -from samdb import SamDB +from __future__ import absolute_import +from .samdb import SamDB class Hostconfig(object): """Aggregate object that contains all information about the configuration diff --git a/selftest/tests.py b/selftest/tests.py index ccd184f60e1..5be8a0238ac 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -73,7 +73,7 @@ planpythontestsuite("none", "samba.tests.dcerpc.rpc_talloc") planpythontestsuite("none", "samba.tests.dcerpc.array") planpythontestsuite("none", "samba.tests.dcerpc.string") -planpythontestsuite("none", "samba.tests.hostconfig") +planpythontestsuite("none", "samba.tests.hostconfig", py3_compatible=True) planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.messaging", py3_compatible=True) planpythontestsuite("none", "samba.tests.samba3sam")