Skip to content

Commit 2461788

Browse files
committed
Minor pylint cleanup
1 parent 0751619 commit 2461788

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

enum4linux-ng.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ def __init__(self, command, target, creds):
516516
self.exec += ['-s', f'{target.samba_config.get_path()}']
517517

518518
# This enables debugging output (level 1) for the Samba client tools. The problem is that the
519-
# tools often throw misleading error codes like NT_STATUS_CONNECTION_DISCONNECTED. Often this
520-
# error is associated with SMB dialect incompatibilities between client and server. But this
519+
# tools often throw misleading error codes like NT_STATUS_CONNECTION_DISCONNECTED. Often this
520+
# error is associated with SMB dialect incompatibilities between client and server. But this
521521
# error also occurs on other occasions. In order to find out the real reason we need to fetch
522522
# earlier errors which this debugging level will provide.
523523
#self.exec += ['-d1']
@@ -981,7 +981,7 @@ def check_smb_dialects(self):
981981

982982
# Does the target only support one dialect? Then this must be also the preferred dialect.
983983
preferred_dialect = None
984-
if sum(1 for value in supported.values() if value == True) == 1:
984+
if sum(1 for value in supported.values() if value is True) == 1:
985985
if last_supported_dialect == SMB_DIALECT:
986986
output["SMB1 only"] = True
987987
self.target.smb1_only = True
@@ -1312,16 +1312,16 @@ def enum_from_smb(self):
13121312
# mean that the 'NetBIOS domain name' is the same as the machine's workgroup. Therefore, we set the domain
13131313
# to the 'NetBIOS computer name' which will enforce local authentication.
13141314

1315-
if (smb_domain_info["NetBIOS computer name"] and
1316-
smb_domain_info["NetBIOS domain name"] and
1315+
if (smb_domain_info["NetBIOS computer name"] and
1316+
smb_domain_info["NetBIOS domain name"] and
13171317
smb_domain_info["DNS domain"] and
1318-
smb_domain_info["FQDN"] and
1319-
smb_domain_info["DNS domain"] in smb_domain_info["FQDN"] and
1318+
smb_domain_info["FQDN"] and
1319+
smb_domain_info["DNS domain"] in smb_domain_info["FQDN"] and
13201320
'.' in smb_domain_info["FQDN"]):
13211321

13221322
smb_domain_info["Derived domain"] = smb_domain_info["NetBIOS domain name"]
13231323
smb_domain_info["Derived membership"] = "domain member"
1324-
1324+
13251325
if not self.creds.local_auth:
13261326
self.creds.set_domain(smb_domain_info["NetBIOS domain name"])
13271327
elif (smb_domain_info["NetBIOS domain name"] and

0 commit comments

Comments
 (0)