mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541)
This commit is contained in:
parent
ab2d481639
commit
d0204963ec
1 changed files with 1 additions and 1 deletions
|
@ -930,7 +930,7 @@ class TestCurses(unittest.TestCase):
|
||||||
# range may be restricted, so we need to check if the limit is still
|
# range may be restricted, so we need to check if the limit is still
|
||||||
# correct
|
# correct
|
||||||
try:
|
try:
|
||||||
curses.init_pair(pair_limit, 0, 0)
|
curses.init_pair(pair_limit - 1, 0, 0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pair_limit = curses.COLOR_PAIRS
|
pair_limit = curses.COLOR_PAIRS
|
||||||
return pair_limit
|
return pair_limit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue