[tor-commits] [nyx/master] features.refreshRate must be in range(1, 25.5)
atagar at torproject.org
atagar at torproject.org
Fri Mar 11 17:11:41 UTC 2016
commit e1f2130a10e1686b4ac74095a9762178ac88dbbf
Author: patacca <patacca at autistici.org>
Date: Thu Mar 10 19:54:49 2016 +0100
features.refreshRate must be in range(1,25.5)
---
nyx/controller.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/nyx/controller.py b/nyx/controller.py
index 5e4f1b9..8585fa7 100644
--- a/nyx/controller.py
+++ b/nyx/controller.py
@@ -30,7 +30,8 @@ NYX_CONTROLLER = None
def conf_handler(key, value):
if key == 'features.redrawRate':
- return max(1, value)
+ # https://docs.python.org/2/library/curses.html?#curses.halfdelay
+ return min(max(1, value), 25.5)
elif key == 'features.refreshRate':
return max(0, value)
More information about the tor-commits
mailing list