Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Fixing AttributeError: 'NoneType' object has no attribute 'error' whi… #769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cme/protocols/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ def create_smbv3_conn(self, kdc=''):
self.smbv1 = False
except socket.error as e:
if str(e).find('Too many open files') != -1:
self.logger.error('SMBv3 connection error on {}: {}'.format(self.host if not kdc else kdc, e))
if not logger is None:
self.logger.error('SMBv3 connection error on {}: {}'.format(self.host if not kdc else kdc, e))
return False
except (Exception, NetBIOSTimeout) as e:
logging.debug('Error creating SMBv3 connection to {}: {}'.format(self.host if not kdc else kdc, e))
Expand Down