Attention

You are looking at outdated documentation for version 1.x. A newer version is available.

5.5.3.1.9. wsgidav.lock_manager

Implements the LockManager object that provides the locking functionality.

The LockManager requires a LockStorage object to implement persistence. Two alternative lock storage classes are defined in the lock_storage module:

  • wsgidav.lock_storage.LockStorageDict
  • wsgidav.lock_storage.LockStorageShelve

The lock data model is a dictionary with these fields:

root:
Resource URL.
principal:
Name of the authenticated user that created the lock.
type:
Must be ‘write’.
scope:
Must be ‘shared’ or ‘exclusive’.
depth:
Must be ‘0’ or ‘infinity’.
owner:
String identifying the owner.
timeout:
Seconds remaining until lock expiration. This value is passed to create() and refresh()
expire:
Converted timeout for persistence: expire = time() + timeout.
token:
Automatically generated unique token.

See Developers info for more information about the WsgiDAV architecture.

Functions

generateLockToken()
isLockExpired(lock)
lockString(lockDict) Return readable rep.
normalizeLockRoot(path)
pprint(object[, stream, indent, width, depth]) Pretty-print a Python object to a stream [default is sys.stdout].
test()
validateLock(lock)

Classes

DAVErrorCondition(conditionCode)
LockManager(storage) Implements locking functionality using a custom storage layer.
ReadWriteLock() Read-Write lock class.

Exceptions

DAVError(statusCode[, contextinfo, …])