Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 1009c49

Browse files
committed
fix registry._setup_database.lock remove issue
It will try to remove non-existing registry._setup_database.lock when search_backend setting to sqlalchemy Signed-off-by: Harrison Feng <[email protected]>
1 parent c83efad commit 1009c49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker_registry/toolkit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ def wrapper(*args, **kwargs):
327327
try:
328328
result = f(*args, **kwargs)
329329
finally:
330-
os.remove(lock_path)
330+
if os.path.exists(lock_path):
331+
os.remove(lock_path)
331332
return result
332333
return wrapper
333334

0 commit comments

Comments
 (0)