diff mercurial/color.py @ 44311:d3f776c4760e

py3: catch AttributeError too with ImportError Looks like py3 raises AttributeError instead of ImportError. This is caught on windows. Differential Revision: https://phab.mercurial-scm.org/D7965
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 22 Jan 2020 03:17:06 +0530
parents ad84fc97d120
children fd2cf9e0c64e
line wrap: on
line diff
--- a/mercurial/color.py	Wed Feb 05 15:15:18 2020 -0500
+++ b/mercurial/color.py	Wed Jan 22 03:17:06 2020 +0530
@@ -44,7 +44,7 @@
         b'cyan': (False, curses.COLOR_CYAN, b''),
         b'white': (False, curses.COLOR_WHITE, b''),
     }
-except ImportError:
+except (ImportError, AttributeError):
     curses = None
     _baseterminfoparams = {}