mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-30 10:38:55 +00:00
docs: update lockfile Python snippet
Port over the downstream changes from https://github.com/balena-io/docs/pull/1184 Change-type: patch Signed-off-by: Matthew McGinn <matthew@balena.io>
This commit is contained in:
parent
91b384a010
commit
d12c10b0c2
@ -70,7 +70,7 @@ lockFile.lock '/tmp/balena/updates.lock', (err) ->
|
||||
In Python you can use the [`lockfile` library](http://pythonhosted.org/lockfile/lockfile.html#examples)
|
||||
```python
|
||||
from lockfile import LockFile
|
||||
lock = LockFile("/tmp/balena/updates.lock")
|
||||
lock = LockFile("/tmp/balena/updates")
|
||||
with lock:
|
||||
print lock.path, 'is locked.'
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user