From 7e7adc64713f74976d5994af36b5f758620fb37b Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 13 Oct 2012 21:39:58 +0200 Subject: added JSON and WS client, re organized tests, new classes for easier api tests --- module/remote/wsbackend/EventHandler.py | 41 --------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 module/remote/wsbackend/EventHandler.py (limited to 'module/remote/wsbackend/EventHandler.py') diff --git a/module/remote/wsbackend/EventHandler.py b/module/remote/wsbackend/EventHandler.py deleted file mode 100644 index 2550ff2eb..000000000 --- a/module/remote/wsbackend/EventHandler.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -############################################################################### -# Copyright(c) 2008-2012 pyLoad Team -# http://www.pyload.org -# -# This file is part of pyLoad. -# pyLoad is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# Subjected to the terms and conditions in LICENSE -# -# @author: RaNaN -############################################################################### - -from threading import Lock - - -from module.utils import lock -from AbstractHandler import AbstractHandler - -class EventHandler(AbstractHandler): - - def __init__(self, api): - AbstractHandler.__init__(self, api) - self.clients = [] - self.lock = Lock() - - @lock - def on_open(self, req): - self.clients.append(req) - - @lock - def on_close(self, req): - self.clients.remove(req) - - def handle_message(self, line, req): - pass \ No newline at end of file -- cgit v1.2.3