Mercurial > kallithea
diff rhodecode/lib/pidlock.py @ 1540:191f3f08236d beta
fixes #258 RhodeCode 1.2 assumes egg folder is writable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 11 Oct 2011 01:08:23 +0200 |
parents | adcfbe0fb453 |
children | d6cb805c92fd |
line wrap: on
line diff
--- a/rhodecode/lib/pidlock.py Mon Oct 10 03:27:31 2011 +0200 +++ b/rhodecode/lib/pidlock.py Tue Oct 11 01:08:23 2011 +0200 @@ -29,17 +29,17 @@ """daemon locking USAGE: try: - l = DaemonLock(desc='test lock') + l = DaemonLock(file_='/path/tolockfile',desc='test lock') main() l.release() except LockHeld: sys.exit(1) """ - def __init__(self, file=None, callbackfn=None, + def __init__(self, file_=None, callbackfn=None, desc='daemon lock', debug=False): - self.pidfile = file if file else os.path.join( + self.pidfile = file_ if file_ else os.path.join( os.path.dirname(__file__), 'running.lock') self.callbackfn = callbackfn