Skip to content

Commit

Permalink
Add error message when port is closed or authentication failed, fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
p0dalirius committed Jun 25, 2024
1 parent 9704643 commit d7f6198
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smbclientng/core/SMBSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ def init_smb_session(self):
sess_port=int(self.port)
)
else:
self.logger.error("Could not connect to '%s:%d'" % (self.host, int(self.port)))
self.connected = False
except OSError as err:
if self.config.debug:
traceback.print_exc()
self.logger.error(err)
self.logger.error("Could not connect to '%s:%d': %s" % (self.host, int(self.port), err))
self.smbClient = None

if self.smbClient is not None:
Expand Down

0 comments on commit d7f6198

Please sign in to comment.