cleanup: removed redundant any() check

This commit is contained in:
Adham Elmosalamy
2024-06-13 06:58:22 +04:00
committed by GitHub
parent 54d7d72780
commit b8760ace24
+4 -5
View File
@@ -116,11 +116,10 @@ class SMBClient:
bad_statuses = [
'LOGON_FAIL', 'PASSWORD_EXPIRED', 'LOCKED_OUT', 'SESSION_DELETED']
if any([s in str(e) for s in bad_statuses]):
for s in bad_statuses:
if s in str(e):
log.warning(
f'{self.server}: {s}: {self.username}')
for s in bad_statuses:
if s in str(e):
log.warning(
f'{self.server}: {s}: {self.username}')
log.debug(f'{self.server}: Trying guest session')
self.username = 'Guest'