1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

PEP8: fix E128: continuation line under-indented for visual indent

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep  6 15:50:17 CEST 2018 on sn-devel-144
This commit is contained in:
Joe Guo 2018-09-04 01:05:52 +12:00 committed by Andrew Bartlett
parent deb819913d
commit 8c2c9794ec
8 changed files with 37 additions and 37 deletions

View File

@ -1327,7 +1327,7 @@ class SearchTests(LdbBaseTest):
try: try:
res11 = self.l.search(base="DC=SAMBA,DCXXXX", res11 = self.l.search(base="DC=SAMBA,DCXXXX",
scope=ldb.SCOPE_ONELEVEL) scope=ldb.SCOPE_ONELEVEL)
self.fail("Should have failed with ERR_INVALID_DN_SYNTAX") self.fail("Should have failed with ERR_INVALID_DN_SYNTAX")
except ldb.LdbError as err: except ldb.LdbError as err:
enum = err.args[0] enum = err.args[0]

View File

@ -120,8 +120,8 @@ def transfer_dns_role(outf, sambaopts, credopts, role, samdb):
m = ldb.Message() m = ldb.Message()
m.dn = ldb.Dn(samdb, role_object) m.dn = ldb.Dn(samdb, role_object)
m["fSMORoleOwner"] = ldb.MessageElement(new_owner, m["fSMORoleOwner"] = ldb.MessageElement(new_owner,
ldb.FLAG_MOD_ADD, ldb.FLAG_MOD_ADD,
"fSMORoleOwner") "fSMORoleOwner")
try: try:
samdb.modify(m) samdb.modify(m)
except LdbError as e5: except LdbError as e5:

View File

@ -1385,7 +1385,7 @@ class cmd_restore(cmd_create):
dtd_header += '\n]>\n' dtd_header += '\n]>\n'
super(cmd_restore, self).run(displayname, H, tmpdir, sambaopts, super(cmd_restore, self).run(displayname, H, tmpdir, sambaopts,
credopts, versionopts) credopts, versionopts)
try: try:
# Iterate over backup files and restore with DTD # Iterate over backup files and restore with DTD

View File

@ -147,9 +147,9 @@ class GpoCmdTestCase(SambaToolCmdTest):
# Compare the directories # Compare the directories
self.assertIsNone(has_difference(os.path.join(new_path, 'policy', self.assertIsNone(has_difference(os.path.join(new_path, 'policy',
gpo_guid), gpo_guid),
static_path, binary=True, static_path, binary=True,
xml=False)) xml=False))
finally: finally:
if gpo_guid: if gpo_guid:
(result, out, err) = self.runsubcmd("gpo", "del", gpo_guid, (result, out, err) = self.runsubcmd("gpo", "del", gpo_guid,
@ -222,10 +222,10 @@ class GpoCmdTestCase(SambaToolCmdTest):
# Compare the directories # Compare the directories
self.assertIsNone(has_difference(os.path.join(new_path, 'policy', self.assertIsNone(has_difference(os.path.join(new_path, 'policy',
gpo_guid1), gpo_guid1),
os.path.join(new_path, 'policy', os.path.join(new_path, 'policy',
gpo_guid2), gpo_guid2),
binary=True, xml=False)) binary=True, xml=False))
finally: finally:
if gpo_guid1: if gpo_guid1:
(result, out, err) = self.runsubcmd("gpo", "del", gpo_guid1, (result, out, err) = self.runsubcmd("gpo", "del", gpo_guid1,
@ -303,10 +303,10 @@ class GpoCmdTestCase(SambaToolCmdTest):
# Compare the directories # Compare the directories
self.assertIsNone(has_difference(os.path.join(new_path, 'policy', self.assertIsNone(has_difference(os.path.join(new_path, 'policy',
gpo_guid1), gpo_guid1),
os.path.join(new_path, 'policy', os.path.join(new_path, 'policy',
gpo_guid2), gpo_guid2),
binary=True, xml=True)) binary=True, xml=True))
finally: finally:
if gpo_guid1: if gpo_guid1:
(result, out, err) = self.runsubcmd("gpo", "del", gpo_guid1, (result, out, err) = self.runsubcmd("gpo", "del", gpo_guid1,
@ -391,9 +391,9 @@ class GpoCmdTestCase(SambaToolCmdTest):
# Compare the directories (XML) # Compare the directories (XML)
self.assertIsNone(has_difference(os.path.join(new_path, 'policy', self.assertIsNone(has_difference(os.path.join(new_path, 'policy',
gpo_guid), gpo_guid),
static_path, binary=False, static_path, binary=False,
xml=True)) xml=True))
finally: finally:
if gpo_guid: if gpo_guid:
(result, out, err) = self.runsubcmd("gpo", "del", gpo_guid, (result, out, err) = self.runsubcmd("gpo", "del", gpo_guid,

View File

@ -102,7 +102,7 @@ def get_quotas(uid, quota_list):
def get_users(): def get_users():
output = subprocess.Popen(['getent', 'passwd'], output = subprocess.Popen(['getent', 'passwd'],
stdout=subprocess.PIPE).communicate()[0].decode("utf-8").split('\n') stdout=subprocess.PIPE).communicate()[0].decode("utf-8").split('\n')
users = [] users = []
for line in output: for line in output:
info = line.split(':') info = line.split(':')
@ -222,7 +222,7 @@ def main():
env.envdir = sys.argv[5] env.envdir = sys.argv[5]
env.smbcquotas = sys.argv[6] env.smbcquotas = sys.argv[6]
quota_script = os.path.join(os.path.dirname(sys.argv[0]), quota_script = os.path.join(os.path.dirname(sys.argv[0]),
"getset_quota.py") "getset_quota.py")
#copy the quota script to the evironment #copy the quota script to the evironment
shutil.copy2(quota_script, env.envdir) shutil.copy2(quota_script, env.envdir)

View File

@ -628,7 +628,7 @@ class ConfidentialAttrTestDenyAcl(ConfidentialAttrCommon):
res = samdb.search(self.test_dn, expression=expr, res = samdb.search(self.test_dn, expression=expr,
scope=SCOPE_SUBTREE, attrs=attr) scope=SCOPE_SUBTREE, attrs=attr)
self.assertTrue(len(res) == expected_num, self.assertTrue(len(res) == expected_num,
"%u results, not %u for search %s, attr %s" % "%u results, not %u for search %s, attr %s" %
(len(res), expected_num, expr, str(attr))) (len(res), expected_num, expr, str(attr)))
# assert we haven't revealed the hidden test-object # assert we haven't revealed the hidden test-object

View File

@ -254,7 +254,7 @@ class DrsBaseTestCase(SambaToolCmdTest):
next_object = ctr6.first_object next_object = ctr6.first_object
for i in range(0, ctr6.object_count): for i in range(0, ctr6.object_count):
print("Obj %d: %s %s" % (i, next_object.object.identifier.dn[:25], print("Obj %d: %s %s" % (i, next_object.object.identifier.dn[:25],
next_object.object.identifier.guid)) next_object.object.identifier.guid))
next_object = next_object.next_object next_object = next_object.next_object
print("Linked Attributes: %d" % ctr6.linked_attributes_count) print("Linked Attributes: %d" % ctr6.linked_attributes_count)
@ -273,7 +273,7 @@ class DrsBaseTestCase(SambaToolCmdTest):
if l.flags & drsuapi.DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE: if l.flags & drsuapi.DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE:
state = "Act" state = "Act"
print(" v%u %s changed %u" % (l.meta_data.version, state, print(" v%u %s changed %u" % (l.meta_data.version, state,
l.meta_data.originating_change_time)) l.meta_data.originating_change_time))
print("HWM: %d" % (ctr6.new_highwatermark.highest_usn)) print("HWM: %d" % (ctr6.new_highwatermark.highest_usn))
print("Tmp HWM: %d" % (ctr6.new_highwatermark.tmp_highest_usn)) print("Tmp HWM: %d" % (ctr6.new_highwatermark.tmp_highest_usn))

View File

@ -32,20 +32,20 @@ def provision_s4(t, func_level="2008"):
t.del_files(["var", "private"]) t.del_files(["var", "private"])
t.run_cmd("rm -f etc/smb.conf") t.run_cmd("rm -f etc/smb.conf")
provision = ['bin/samba-tool', provision = ['bin/samba-tool',
'domain', 'domain',
'provision', 'provision',
'--realm=${LCREALM}', '--realm=${LCREALM}',
'--domain=${DOMAIN}', '--domain=${DOMAIN}',
'--adminpass=${PASSWORD1}', '--adminpass=${PASSWORD1}',
'--server-role=domain controller', '--server-role=domain controller',
'--function-level=%s' % func_level, '--function-level=%s' % func_level,
'-d${DEBUGLEVEL}', '-d${DEBUGLEVEL}',
'--option=interfaces=${INTERFACE}', '--option=interfaces=${INTERFACE}',
'--host-ip=${INTERFACE_IP}', '--host-ip=${INTERFACE_IP}',
'--option=bind interfaces only=yes', '--option=bind interfaces only=yes',
'--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf', '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf',
'--dns-backend=${NAMESERVER_BACKEND}', '--dns-backend=${NAMESERVER_BACKEND}',
'${DNS_FORWARDER}'] '${DNS_FORWARDER}']
if t.getvar('USE_NTVFS'): if t.getvar('USE_NTVFS'):
provision.append('${USE_NTVFS}') provision.append('${USE_NTVFS}')