diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2017-10-18 15:26:06 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2017-10-18 15:26:06 +0100 |
commit | af73b413eb8d143499c6f6d796aab5aa03efd75a (patch) | |
tree | 8e345d5389094874795ac8557b303b89bf47630e /poezio/theming.py | |
parent | 9844f288de27dac7095c82832ad51c75ede7a362 (diff) | |
download | poezio-af73b413eb8d143499c6f6d796aab5aa03efd75a.tar.gz poezio-af73b413eb8d143499c6f6d796aab5aa03efd75a.tar.bz2 poezio-af73b413eb8d143499c6f6d796aab5aa03efd75a.tar.xz poezio-af73b413eb8d143499c6f6d796aab5aa03efd75a.zip |
Check whether curses.A_ITALIC exists, fixes a traceback on <em/> on Python < 3.7.
Diffstat (limited to 'poezio/theming.py')
-rwxr-xr-x | poezio/theming.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |