- integrations
- Python
- ocx_sdk
LockStatus
LockStatusclassdataclass#
Re-exported from
ocx_sdk._resultsView sourceclass 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
| Name | Type | Description |
|---|---|---|
present | bool | A lock file exists. |
current | bool | It matches the declaration it was generated from. |
lock_version | int | None | Lock file format version. |
declaration_hash | str | None | Hash recorded in the lock file. |
declaration_hash_expected | str | None | Hash of the declaration as it reads now.
Differs from declaration_hash exactly when current is false. |
generated_by | str | None | The ocx version that wrote the lock file. |
generated_at | str | None | When it did, as ocx spelled it. |
error | str | None | Why the lock file could not be read, when it could not be. |
currentattributeclass attributeinstance attribute#
current: bool = Falsedeclaration_hashattributeclass attributeinstance attribute#
declaration_hash: str | None = Nonedeclaration_hash_expectedattributeclass attributeinstance attribute#
declaration_hash_expected: str | None = Noneerrorattributeclass attributeinstance attribute#
error: str | None = Nonegenerated_atattributeclass attributeinstance attribute#
generated_at: str | None = Nonegenerated_byattributeclass attributeinstance attribute#
generated_by: str | None = Nonelock_versionattributeclass attributeinstance attribute#
lock_version: int | None = Nonepresentattributeclass attributeinstance attribute#
present: bool = Falsefrom_dictmethodclassmethod#
def from_dict(data: Mapping[str, Any]) -> LockStatusBuild from the decoded lock object.