summaryrefslogtreecommitdiffstats
path: root/module/plugins/Hook.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-19 23:22:14 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-02-19 23:22:14 +0100
commite1927e427125a93a8f6ea369b760f7f21f879fcc (patch)
tree5a6ae69172fef51da1f6e4df2c7b869977f7b17d /module/plugins/Hook.py
parentencoding fixes (diff)
downloadpyload-e1927e427125a93a8f6ea369b760f7f21f879fcc.tar.xz
new permission system
Diffstat (limited to 'module/plugins/Hook.py')
-rw-r--r--module/plugins/Hook.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/plugins/Hook.py b/module/plugins/Hook.py
index 4bbf6e33a..56541f7fe 100644
--- a/module/plugins/Hook.py
+++ b/module/plugins/Hook.py
@@ -18,6 +18,12 @@
@interface-version: 0.2
"""
+from thread import start_new_thread
+
+def threaded(f):
+ def run(*args,**kwargs):
+ return start_new_thread(f, args, kwargs)
+ return run
class Hook():
__name__ = "Hook"
@@ -39,7 +45,7 @@ class Hook():
self.setup()
def __repr__(self):
- return self.__name__
+ return "<Hook %s>" % self.__name__
def setup(self):
""" more init stuff if needed"""