##// END OF EJS Templates
py3: catch AttributeError too with ImportError...
Pulkit Goyal -
r44736:d3f776c4 default
parent child Browse files
Show More
@@ -44,7 +44,7 b' try:'
44 b'cyan': (False, curses.COLOR_CYAN, b''),
44 b'cyan': (False, curses.COLOR_CYAN, b''),
45 b'white': (False, curses.COLOR_WHITE, b''),
45 b'white': (False, curses.COLOR_WHITE, b''),
46 }
46 }
47 except ImportError:
47 except (ImportError, AttributeError):
48 curses = None
48 curses = None
49 _baseterminfoparams = {}
49 _baseterminfoparams = {}
50
50
@@ -63,13 +63,13 b' try:'
63 import curses.ascii
63 import curses.ascii
64
64
65 curses.error
65 curses.error
66 except ImportError:
66 except (ImportError, AttributeError):
67 # I have no idea if wcurses works with crecord...
67 # I have no idea if wcurses works with crecord...
68 try:
68 try:
69 import wcurses as curses
69 import wcurses as curses
70
70
71 curses.error
71 curses.error
72 except ImportError:
72 except (ImportError, AttributeError):
73 # wcurses is not shipped on Windows by default, or python is not
73 # wcurses is not shipped on Windows by default, or python is not
74 # compiled with curses
74 # compiled with curses
75 curses = False
75 curses = False
@@ -685,7 +685,7 b' def has_tic():'
685
685
686 curses.COLOR_BLUE
686 curses.COLOR_BLUE
687 return matchoutput('test -x "`which tic`"', br'')
687 return matchoutput('test -x "`which tic`"', br'')
688 except ImportError:
688 except (ImportError, AttributeError):
689 return False
689 return False
690
690
691
691
General Comments 0
You need to be logged in to leave comments. Login now