summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/netcmd/domainlevel.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-08 23:18:17 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-08 23:20:36 +0200
commit7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7 (patch)
treeead30902a0fcf12e0ff8de096528a1a00e70eedc /source4/scripting/python/samba/netcmd/domainlevel.py
parentae6d306c68aeb79280a950409352c76bad4fcd33 (diff)
downloadsamba-7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7.tar.gz
samba-7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7.tar.xz
samba-7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7.zip
s4-python: Fix formatting, use standard convention to call instance methods.
Diffstat (limited to 'source4/scripting/python/samba/netcmd/domainlevel.py')
-rw-r--r--source4/scripting/python/samba/netcmd/domainlevel.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py b/source4/scripting/python/samba/netcmd/domainlevel.py
index 1874191e1f3..ecd835ddd26 100644
--- a/source4/scripting/python/samba/netcmd/domainlevel.py
+++ b/source4/scripting/python/samba/netcmd/domainlevel.py
@@ -76,20 +76,20 @@ class cmd_domainlevel(Command):
samdb = SamDB(url=H, session_info=system_session(),
credentials=creds, lp=lp)
- domain_dn = SamDB.domain_dn(samdb)
+ domain_dn = samdb.domain_dn()
res_forest = samdb.search("CN=Partitions,CN=Configuration," + domain_dn,
scope=ldb.SCOPE_BASE, attrs=["msDS-Behavior-Version"])
- assert(len(res_forest) == 1)
+ assert len(res_forest) == 1
res_domain = samdb.search(domain_dn, scope=ldb.SCOPE_BASE,
attrs=["msDS-Behavior-Version", "nTMixedDomain"])
- assert(len(res_domain) == 1)
+ assert len(res_domain) == 1
res_dc_s = samdb.search("CN=Sites,CN=Configuration," + domain_dn,
scope=ldb.SCOPE_SUBTREE, expression="(objectClass=nTDSDSA)",
attrs=["msDS-Behavior-Version"])
- assert(len(res_dc_s) >= 1)
+ assert len(res_dc_s) >= 1
try:
level_forest = int(res_forest[0]["msDS-Behavior-Version"][0])