Browse Source

Remove lockfile when done.

This isn't necessary for correct behavior: if the database is killed,
the old flock() will go away when the file descriptor gets closed.
tags/nilmdb-1.4.4
Jim Paris 11 years ago
parent
commit
59a79a30a5
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      nilmdb/server/bulkdata.py

+ 4
- 0
nilmdb/server/bulkdata.py View File

@@ -58,6 +58,10 @@ class BulkData(object):
if self.lockfile:
nilmdb.utils.lock.exclusive_unlock(self.lockfile)
self.lockfile.close()
try:
os.unlink(self.lock)
except OSError: # pragma: no cover
pass
self.lockfile = None

def _encode_filename(self, path):


Loading…
Cancel
Save