No self here.

This commit is contained in:
Faik Uygur
2008-10-16 07:19:16 +00:00
parent 2fd6314239
commit 41f8f467dc
+2 -2
View File
@@ -53,12 +53,12 @@ def locked(func):
""" """
Decorator for synchronizing privileged functions Decorator for synchronizing privileged functions
""" """
def wrapper(self,*__args,**__kw): def wrapper(*__args,**__kw):
lock = file(pisi.util.join_path(pisi.context.config.lock_dir(), 'pisi'), 'w') lock = file(pisi.util.join_path(pisi.context.config.lock_dir(), 'pisi'), 'w')
try: try:
fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
try: try:
return func(self,*__args,**__kw) return func(*__args,**__kw)
except Exception, e: except Exception, e:
lock.close() lock.close()
raise e raise e