diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-18 14:37:00 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-18 14:37:00 +0200 |
commit | 40fc4979e4ca1f2a74972f68a88212b16cc26458 (patch) | |
tree | 9d1900929441be5d88f2c8a4602c5249d64f9a51 /module/database | |
parent | fixes setup unicode errors (diff) | |
download | pyload-40fc4979e4ca1f2a74972f68a88212b16cc26458.tar.xz |
some more locks
Diffstat (limited to 'module/database')
-rw-r--r-- | module/database/FileDatabase.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py index 6ea7d1104..0ed526240 100644 --- a/module/database/FileDatabase.py +++ b/module/database/FileDatabase.py @@ -21,7 +21,7 @@ from threading import RLock from time import time -from module.utils import formatSize +from module.utils import formatSize, lock from module.PullEvents import InsertEvent, ReloadAllEvent, RemoveEvent, UpdateEvent from module.PyPackage import PyPackage from module.PyFile import PyFile @@ -67,17 +67,7 @@ class FileHandler: args[0].jobCache = {} return func(*args) return new - - def lock(func): - def new(*args): - #print "Handler: %s args: %s" % (func,args[1:]) - args[0].lock.acquire() - res = func(*args) - args[0].lock.release() - #print "Handler: %s return: %s" % (func, res) - return res - return new - + #---------------------------------------------------------------------- def save(self): """saves all data to backend""" |