diff --git a/cme/protocols/smb.py b/cme/protocols/smb.py index 7e62a6b67..7e5fcd323 100755 --- a/cme/protocols/smb.py +++ b/cme/protocols/smb.py @@ -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))