Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

kiwix-hotspot: use shutil to find correct bin path. #686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions kiwix-hotspot/backend/sysreq.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import sys
import shutil

from backend.mount import system_has_exfat

Expand Down Expand Up @@ -39,13 +40,13 @@ def host_matches_requirements(build_dir):
missing_reqs.append("udisks2 (udisksctl) is required.")

# exfat
mount_exfat = "/sbin/mount.exfat"
mount_exfat = shutil.which('mount.exfat-fuse')
if not system_has_exfat() and (
not os.path.exists(mount_exfat) or not os.access(mount_exfat, os.X_OK)
):
missing_reqs.append("exfat-fuse is required.")

mkfs_exfat = "/sbin/mkfs.exfat"
mkfs_exfat = shutil.which('mkfs.exfat')
if not os.path.exists(mkfs_exfat) or not os.access(mkfs_exfat, os.X_OK):
missing_reqs.append("exfat-utils is required.")

Expand Down