diff options
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 |