More helpful error message when the database is locked

This commit is contained in:
Kovid Goyal 2007-12-10 17:26:55 +00:00
parent 9f7664f591
commit 202c7f2246

View File

@ -55,7 +55,7 @@ def _lock(path):
try: try:
_lock_file = open(path, 'wb') _lock_file = open(path, 'wb')
except IOError: except IOError:
raise DatabaseLocked('Database in use by another instance', _lock_file.name) raise DatabaseLocked('Database in use by another instance', path)
try: try:
import fcntl, errno import fcntl, errno
try: try: