Skip to content

Commit

Permalink
ota_client_stub: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Apr 21, 2024
1 parent e7266ed commit 374abe7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion otaclient/app/ota_client_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,18 @@ def _subprocess_init(self):

def _mount_external_cache_storage(self):
# detect cache_dev on every startup
_cache_dev = CMDHelperFuncs._findfs("LABEL", self._external_cache_dev_fslabel)
_cache_dev = CMDHelperFuncs.get_dev_by_token(
"LABEL", self._external_cache_dev_fslabel
)
if not _cache_dev:
return

if len(_cache_dev) > 1:
logger.warning(
f"multiple external cache storage device found, use the first one: {_cache_dev[0]}"
)
_cache_dev = _cache_dev[0]

self.logger.info(f"external cache dev detected at {_cache_dev}")
self._external_cache_dev = _cache_dev

Expand Down

0 comments on commit 374abe7

Please sign in to comment.