Open arthurjy opened 8 years ago
Thanks @arthurjy, will attempt to make more robust. Thanks for the Mac output, it differs from the Linux output which prints the filesystem type separately. Regards, Chris.
Hi @arthurjy, I have pushed a change to the mac_os branch which now uses psutil to get the disk partitions.
If you pull the latest changes, change to the mac_os branch, you should be able to run the mounts.py file to see a list of the mount points. You'll need to install the 'psutil' library to use the new functionality, but it will fall back to the logic you have above.
git pull
git checkout mac_os
cd kmeldb
python3 mounts.py
I'd appreciate it if you post the output here, so I can see how it's working. If you have 'psutil' installed it will actually run the test twice (once with psutil, once with the fallback) and compare the results.
There are not 6 tokens to split line into. Example Mac output:-
Also note, the FAT formatted volume has a filesystem attribute of 'msdos'
I progressed past this point with this temporary fix:-
However the checking if the mount point is of FAT (or MSDOS) type needs to be more robust.