Skip to content
ocx
install

LockStatus

LockStatusclassdataclass#

Re-exported from ocx_sdk._resultsView source
class LockStatus(present: bool = False, current: bool = False, lock_version: int | None = None, declaration_hash: str | None = None, declaration_hash_expected: str | None = None, generated_by: str | None = None, generated_at: str | None = None, error: str | None = None)

The lock block of ocx status.

A lock file that is broken or unreadable is payload, not failure: ocx still exits 0 and reports error here. Callers check current, not the exit code.

Attributes

NameTypeDescription
presentboolA lock file exists.
currentboolIt matches the declaration it was generated from.
lock_versionint | NoneLock file format version.
declaration_hashstr | NoneHash recorded in the lock file.
declaration_hash_expectedstr | NoneHash of the declaration as it reads now. Differs from declaration_hash exactly when current is false.
generated_bystr | NoneThe ocx version that wrote the lock file.
generated_atstr | NoneWhen it did, as ocx spelled it.
errorstr | NoneWhy the lock file could not be read, when it could not be.

currentattributeclass attributeinstance attribute#

current: bool = False

declaration_hashattributeclass attributeinstance attribute#

declaration_hash: str | None = None

declaration_hash_expectedattributeclass attributeinstance attribute#

declaration_hash_expected: str | None = None

errorattributeclass attributeinstance attribute#

error: str | None = None

generated_atattributeclass attributeinstance attribute#

generated_at: str | None = None

generated_byattributeclass attributeinstance attribute#

generated_by: str | None = None

lock_versionattributeclass attributeinstance attribute#

lock_version: int | None = None

presentattributeclass attributeinstance attribute#

present: bool = False

from_dictmethodclassmethod#

def from_dict(data: Mapping[str, Any]) -> LockStatus

Build from the decoded lock object.