mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-23 17:59:17 +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
@ -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…
x
Reference in New Issue
Block a user