mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
Improve FS discovery logging
This commit is contained in:
parent
587905ed9a
commit
ef7b1b95f6
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@ def get_all_mounts() -> List:
|
|||
async def mount_to_fs_handler(path: Path) -> str:
|
||||
# TODO: This is a hacky way to get the filesystem type, but it works for now.
|
||||
# Maybe with libblkid Python bindings?
|
||||
logger.info(f"Getting filesystem for mount: {path}")
|
||||
proc = await asyncio.create_subprocess_exec(
|
||||
"stat", "-f", "-L", "-c", "%T", str(path), stdout=asyncio.subprocess.PIPE, stdin=asyncio.subprocess.PIPE
|
||||
)
|
||||
|
@ -41,6 +42,7 @@ async def mount_to_fs_handler(path: Path) -> str:
|
|||
raise RuntimeError(err)
|
||||
|
||||
fs = stdout.decode().strip()
|
||||
logger.info(f"Filesystem for {path}: {fs}")
|
||||
|
||||
try:
|
||||
return FSHandlers[fs]
|
||||
|
|
Loading…
Reference in a new issue