diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-03-28 22:32:14 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-06-28 02:47:08 +0200 |
commit | b1fffc3a1b2dbbb807213b85f538e59251b9bf35 (patch) | |
tree | c373d3234dcb474bb424371a3d89341bed8a9e07 /module/PullEvents.py | |
parent | Plugins licensing doc (diff) | |
download | pyload-b1fffc3a1b2dbbb807213b85f538e59251b9bf35.tar.xz |
Remove bad whitespaces
Merged vuolter/pyload@00288e6
Diffstat (limited to 'module/PullEvents.py')
-rw-r--r-- | module/PullEvents.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/module/PullEvents.py b/module/PullEvents.py index 5ec76765e..b8859a9a6 100644 --- a/module/PullEvents.py +++ b/module/PullEvents.py @@ -13,7 +13,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: mkaay """ @@ -24,15 +24,15 @@ class PullManager(): def __init__(self, core): self.core = core self.clients = [] - + def newClient(self, uuid): self.clients.append(Client(uuid)) - + def clean(self): for n, client in enumerate(self.clients): if client.lastActive + 30 < time(): del self.clients[n] - + def getEvents(self, uuid): events = [] validUuid = False @@ -47,7 +47,7 @@ class PullManager(): self.newClient(uuid) events = [ReloadAllEvent("queue").toList(), ReloadAllEvent("collector").toList()] return uniqify(events, repr) - + def addEvent(self, event): for client in self.clients: client.addEvent(event) @@ -57,15 +57,15 @@ class Client(): self.uuid = uuid self.lastActive = time() self.events = [] - + def newEvents(self): return len(self.events) > 0 - + def popEvent(self): if not len(self.events): return None return self.events.pop(0) - + def addEvent(self, event): self.events.append(event) @@ -76,7 +76,7 @@ class UpdateEvent(): self.type = itype self.id = iid self.destination = destination - + def toList(self): return ["update", self.destination, self.type, self.id] @@ -87,7 +87,7 @@ class RemoveEvent(): self.type = itype self.id = iid self.destination = destination - + def toList(self): return ["remove", self.destination, self.type, self.id] @@ -99,7 +99,7 @@ class InsertEvent(): self.id = iid self.after = after self.destination = destination - + def toList(self): return ["insert", self.destination, self.type, self.id, self.after] @@ -107,7 +107,7 @@ class ReloadAllEvent(): def __init__(self, destination): assert destination == "queue" or destination == "collector" self.destination = destination - + def toList(self): return ["reload", self.destination] |