changeset 40763:3ede5d1724bb

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.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 17 Nov 2018 20:56:25 +0900
parents 37d6ee46a965
children 567e164f89b8
files hgext/blackbox.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))