diff options
Diffstat (limited to 'module/network/Bucket.py')
-rw-r--r-- | module/network/Bucket.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/module/network/Bucket.py b/module/network/Bucket.py index 69da277ae..a096d644a 100644 --- a/module/network/Bucket.py +++ b/module/network/Bucket.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify @@ -13,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: RaNaN """ @@ -47,7 +46,7 @@ class Bucket: time = -self.tokens/float(self.rate) else: time = 0 - + self.lock.release() return time @@ -58,4 +57,3 @@ class Bucket: delta = self.rate * (now - self.timestamp) self.tokens = min(self.rate, self.tokens + delta) self.timestamp = now - |