# HG changeset patch # User Yuya Nishihara # Date 1542455785 -32400 # Node ID 3ede5d1724bbbd007b6f097d5b800d499674aa5e # Parent 37d6ee46a9650186964ccc71cf0656995e1f3522 blackbox: do not nullify repo to deactivate the logger on failure The _repo will be a mandatory attribute. Instead, make the logger to not track any events. diff -r 37d6ee46a965 -r 3ede5d1724bb hgext/blackbox.py --- a/hgext/blackbox.py Sun Nov 11 20:02:34 2018 +0900 +++ b/hgext/blackbox.py Sat Nov 17 20:56:25 2018 +0900 @@ -184,7 +184,7 @@ fp.write(fmt % args) except (IOError, OSError) as err: # deactivate this to avoid failed logging again - self._repo = None + self._trackedevents.clear() ui.debug('warning: cannot write to blackbox.log: %s\n' % encoding.strtolocal(err.strerror))