mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
[Console] Fix curses.init_pair raise ValueError on Py3.10
Fix ValueError crash for console users with Python 3.10 Trac: https://dev.deluge-torrent.org/ticket/3518 See-also: https://docs.python.org/3/whatsnew/3.10.html#curses
This commit is contained in:
parent
7f0a380576
commit
cd63efd935
1 changed files with 2 additions and 2 deletions
|
@ -88,8 +88,8 @@ def init_colors():
|
|||
curses.init_pair(counter, fg, bg)
|
||||
color_pairs[(fg_name, bg_name)] = counter
|
||||
counter += 1
|
||||
except curses.error as ex:
|
||||
log.warning('Error: %s', ex)
|
||||
except (curses.error, ValueError) as ex:
|
||||
log.debug(f'Color pair {fg_name} {bg_name} not available: {ex}')
|
||||
return counter
|
||||
|
||||
# Create the color_pairs dict
|
||||
|
|
Loading…
Add table
Reference in a new issue