mirror of
https://git.code.sf.net/p/archivemail/code
synced 2024-12-22 07:42:55 +00:00
In verbose mode, say that we're about to dotlock an mbox before trying to do so
This commit is contained in:
parent
0f2b04ff89
commit
2b7baaf294
1 changed files with 2 additions and 1 deletions
|
@ -371,6 +371,8 @@ class LockableMboxMixin:
|
|||
pid = os.getpid()
|
||||
box_dir, prelock_prefix = os.path.split(self.mbox_file_name)
|
||||
prelock_suffix = ".%s.%s%s" % (hostname, pid, options.lockfile_extension)
|
||||
lock_name = self.mbox_file_name + options.lockfile_extension
|
||||
vprint("trying to create dotlock file '%s'" % lock_name)
|
||||
try:
|
||||
plfd, prelock_name = tempfile.mkstemp(prelock_suffix, prelock_prefix,
|
||||
dir=box_dir)
|
||||
|
@ -381,7 +383,6 @@ class LockableMboxMixin:
|
|||
self.mbox_file_name)
|
||||
return
|
||||
raise
|
||||
lock_name = self.mbox_file_name + options.lockfile_extension
|
||||
try:
|
||||
try:
|
||||
os.link(prelock_name, lock_name)
|
||||
|
|
Loading…
Reference in a new issue