[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] features.refreshRate must be in range(1, 25.5)



commit e1f2130a10e1686b4ac74095a9762178ac88dbbf
Author: patacca <patacca@xxxxxxxxxxxxx>
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)
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits