# HG changeset patch # User Mads Kiilerich # Date 2017-08-12 17:40:01 # Node ID 6ca4f9f68eb52cb3a7487ab7705c8a6268b62776 # Parent d8b7a1a023a6047e0a999a42b8404ac97d931ff9 make-index: move make_index.lock to the index location - don't assume that the .ini directory is writable diff --git a/kallithea/lib/paster_commands/make_index.py b/kallithea/lib/paster_commands/make_index.py --- a/kallithea/lib/paster_commands/make_index.py +++ b/kallithea/lib/paster_commands/make_index.py @@ -57,8 +57,7 @@ class Command(BasePasterCommand): from kallithea.lib.pidlock import LockHeld, DaemonLock from kallithea.lib.indexers.daemon import WhooshIndexingDaemon try: - l = DaemonLock(file_=os.path.join(dirname(dirname(index_location)), - 'make_index.lock')) + l = DaemonLock(file_=os.path.join(index_location, 'make_index.lock')) WhooshIndexingDaemon(index_location=index_location, repo_location=repo_location, repo_list=repo_list, diff --git a/kallithea/tests/fixture.py b/kallithea/tests/fixture.py --- a/kallithea/tests/fixture.py +++ b/kallithea/tests/fixture.py @@ -411,7 +411,7 @@ def create_test_index(repo_location, con if not os.path.exists(index_location): os.makedirs(index_location) - l = DaemonLock(file_=os.path.join(dirname(index_location), 'make_index.lock')) + l = DaemonLock(file_=os.path.join(index_location, 'make_index.lock')) WhooshIndexingDaemon(index_location=index_location, repo_location=repo_location) \ .run(full_index=full_index)