diff --git a/tools/python/utils/util.py b/tools/python/utils/util.py index 3c8bc80c6d1d1f53ae7bf0fce68fc481b0f454fa..a6db7bbdc4910348fc9997c2446939df72df62e4 100644 --- a/tools/python/utils/util.py +++ b/tools/python/utils/util.py @@ -208,8 +208,9 @@ def abi_to_internal(abi): # lock ################################ def device_lock(device_id, timeout=7200): - return filelock.FileLock("/tmp/device-lock-%s" % device_id, - timeout=timeout) + return filelock.FileLock( + "/tmp/device-lock-%s" % device_id.replace("/", ""), + timeout=timeout) def is_device_locked(device_id): diff --git a/tools/sh_commands.py b/tools/sh_commands.py index 4b02948549faad746e6ef5e6c01ad9d4ae60de6a..c713b0c22bfed535f3e37d1ddc58788830266d56 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -70,7 +70,7 @@ def device_lock_path(serialno): def device_lock(serialno, timeout=7200): import filelock - return filelock.FileLock(device_lock_path(serialno), timeout=timeout) + return filelock.FileLock(device_lock_path(serialno.replace("/", "")), timeout=timeout) def is_device_locked(serialno):