Skip to content

Commit

Permalink
Merge pull request #366 from Juniper/master
Browse files Browse the repository at this point in the history
cleanup logging
  • Loading branch information
einarnn committed Jan 11, 2020
2 parents fbaa400 + 3e6af3a commit 80097e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ncclient/transport/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ def _dispatch_message(self, raw):
else:
self.logger.error('error parsing dispatch message: %s', e)
return
self.logger.debug('dispatching message to different listeners: %s',
raw)
with self._lock:
listeners = list(self._listeners)
for l in listeners:
self.logger.debug('dispatching message to %r: %s', l, raw)
self.logger.debug('dispatching message to listener: %r', l)
l.callback(root, raw) # no try-except; fail loudly if you must!

def _dispatch_error(self, err):
Expand Down

0 comments on commit 80097e1

Please sign in to comment.