diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-30 00:00:23 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-12-30 00:00:23 +0100 |
commit | ad8d7b544ba46f17096eba2828a99ea56a117bc0 (patch) | |
tree | 628dc1f723559185763edc90c5a460306266ad4d /module/network/Bucket.py | |
parent | MU free fixed (diff) | |
download | pyload-ad8d7b544ba46f17096eba2828a99ea56a117bc0.tar.xz |
improved performance for wlan
Diffstat (limited to 'module/network/Bucket.py')
-rw-r--r-- | module/network/Bucket.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/network/Bucket.py b/module/network/Bucket.py index 1a2d77409..69da277ae 100644 --- a/module/network/Bucket.py +++ b/module/network/Bucket.py @@ -26,7 +26,10 @@ class Bucket: self.tokens = 0 self.timestamp = time() self.lock = Lock() - + + def __nonzero__(self): + return False if self.rate < 10240 else True + def setRate(self, rate): self.lock.acquire() self.rate = int(rate) |