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/Utils.py | |
parent | fixes setup unicode errors (diff) | |
download | pyload-40fc4979e4ca1f2a74972f68a88212b16cc26458.tar.xz |
some more locks
Diffstat (limited to 'module/Utils.py')
-rw-r--r-- | module/Utils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/Utils.py b/module/Utils.py index 45fa81d52..0ba3fb035 100644 --- a/module/Utils.py +++ b/module/Utils.py @@ -144,10 +144,12 @@ def parseFileSize(string): #returns bytes 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() - return res + try: + return func(*args) + finally: + args[0].lock.release() return new |