# HG changeset patch # User Matt Harbison # Date 2021-03-13 00:02:07 # Node ID 693991ccfc497aa837c2086c97367d109fa7f402 # Parent 70f8c64812db874acb9924672ce7a8ccdad0554d crecord: null out the curses attribute with `None` on failure to import Pytype got really confused that this could be `Union[module, bool]`, and spewed about tons of attributes that are not available on `bool`. Differential Revision: https://phab.mercurial-scm.org/D10210 diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -64,7 +64,7 @@ try: curses.error except (ImportError, AttributeError): - curses = False + curses = None class fallbackerror(error.Abort):