From af73b413eb8d143499c6f6d796aab5aa03efd75a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 18 Oct 2017 15:26:06 +0100 Subject: Check whether curses.A_ITALIC exists, fixes a traceback on on Python < 3.7. --- poezio/theming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'poezio/theming.py') diff --git a/poezio/theming.py b/poezio/theming.py index 813f8bc0..d007e463 100755 --- a/poezio/theming.py +++ b/poezio/theming.py @@ -445,7 +445,7 @@ def to_curses_attr(color_tuple): curses_pair = curses_pair | curses.A_BOLD if 'u' in additional_val: curses_pair = curses_pair | curses.A_UNDERLINE - if 'i' in additional_val: + if 'i' in additional_val and hasattr(curses, 'A_ITALIC'): curses_pair = curses_pair | curses.A_ITALIC if 'a' in additional_val: curses_pair = curses_pair | curses.A_BLINK -- cgit v1.2.3