mirror of
https://github.com/samba-team/samba.git
synced 2025-12-12 12:23:50 +03:00
python: Remove unnecessary 'pass' statements
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
committed by
Andreas Schneider
parent
0eb3041bfa
commit
ba54c9cc06
@@ -135,7 +135,6 @@ class dbcheck(object):
|
||||
(enum, estr) = e5.args
|
||||
if enum != ldb.ERR_NO_SUCH_OBJECT:
|
||||
raise
|
||||
pass
|
||||
|
||||
self.system_session_info = system_session()
|
||||
self.admin_session_info = admin_session(None, samdb.get_domain_sid())
|
||||
@@ -237,7 +236,6 @@ class dbcheck(object):
|
||||
(enum, estr) = e6.args
|
||||
if enum != ldb.ERR_NO_SUCH_OBJECT:
|
||||
raise
|
||||
pass
|
||||
|
||||
def check_database(self, DN=None, scope=ldb.SCOPE_SUBTREE, controls=None,
|
||||
attrs=None):
|
||||
|
||||
@@ -1588,7 +1588,6 @@ def replay_seq_in_fork(cs, start, context, account, client_id, server_id=1):
|
||||
os.close(1)
|
||||
except IOError as e:
|
||||
LOGGER.info("stdout closing failed with %s" % e)
|
||||
pass
|
||||
|
||||
sys.stdout = f
|
||||
now = time.time() - start
|
||||
@@ -1630,7 +1629,6 @@ def dnshammer_in_fork(dns_rate, duration, context, query_file=None):
|
||||
os.close(1)
|
||||
except IOError as e:
|
||||
LOGGER.warn("stdout closing failed with %s" % e)
|
||||
pass
|
||||
filename = os.path.join(context.statsdir, 'stats-dns')
|
||||
sys.stdout = open(filename, 'w')
|
||||
|
||||
|
||||
@@ -1131,7 +1131,6 @@ class DCJoinContext(object):
|
||||
except WERRORError as e:
|
||||
if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST:
|
||||
name_found = False
|
||||
pass
|
||||
|
||||
if name_found:
|
||||
for rec in res.rec:
|
||||
|
||||
@@ -29,7 +29,6 @@ import textwrap
|
||||
|
||||
class Option(SambaOption):
|
||||
SUPPRESS_HELP = optparse.SUPPRESS_HELP
|
||||
pass
|
||||
|
||||
# This help formatter does text wrapping and preserves newlines
|
||||
|
||||
|
||||
@@ -105,7 +105,6 @@ def add_dns_records(
|
||||
except WERRORError as e:
|
||||
if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST:
|
||||
name_found = False
|
||||
pass
|
||||
|
||||
if name_found:
|
||||
for rec in res.rec:
|
||||
|
||||
@@ -2877,7 +2877,6 @@ class cmd_domain_trust_delete(DomainTrustCommand):
|
||||
if not self.check_runtime_error(error, ntstatus.NT_STATUS_OBJECT_NAME_NOT_FOUND):
|
||||
raise self.RemoteRuntimeError(self, error, "QueryTrustedDomainInfoByName(%s)" % (
|
||||
lsaString.string))
|
||||
pass
|
||||
|
||||
if remote_tdo_info is not None:
|
||||
if local_lsa_info.sid != remote_tdo_info.sid or \
|
||||
|
||||
@@ -405,7 +405,6 @@ def remove_dc(samdb, logger, dc_name):
|
||||
|
||||
ntds_dn = ldb.Dn(samdb, "CN=NTDS Settings")
|
||||
ntds_dn.add_base(server_dn)
|
||||
pass
|
||||
|
||||
# Confirm this is really an ntdsDSA object
|
||||
try:
|
||||
@@ -415,7 +414,6 @@ def remove_dc(samdb, logger, dc_name):
|
||||
(enum, estr) = e7.args
|
||||
if enum == ldb.ERR_NO_SUCH_OBJECT:
|
||||
ntds_msgs = []
|
||||
pass
|
||||
else:
|
||||
samdb.transaction_cancel()
|
||||
raise DemoteException(
|
||||
|
||||
Reference in New Issue
Block a user