further platform cleanup
This commit is contained in:
parent
8a55c52441
commit
3d1ac485ef
@ -1359,18 +1359,19 @@ def mount_cb(device, callback, data=None, rw=False, mtype=None, sync=True):
|
|||||||
mtypes = None
|
mtypes = None
|
||||||
|
|
||||||
# clean up 'mtype' input a bit based on platform.
|
# clean up 'mtype' input a bit based on platform.
|
||||||
platform_lower = platform.system.lower()
|
platsys = platform.system().lower()
|
||||||
if platform_lower == "linux":
|
if platsys == "linux":
|
||||||
if mtypes is None:
|
if mtypes is None:
|
||||||
mtypes = ["auto"]
|
mtypes = ["auto"]
|
||||||
elif platform_lower.endswith("bsd"):
|
elif platsys.endswith("bsd"):
|
||||||
if mtypes is None:
|
if mtypes is None:
|
||||||
mtypes = ['ufs', 'cd9660', 'vfat']
|
mtypes = ['ufs', 'cd9660', 'vfat']
|
||||||
for index, mtype in enumerate(mtypes):
|
for index, mtype in enumerate(mtypes):
|
||||||
if mtype == "iso9660":
|
if mtype == "iso9660":
|
||||||
mtypes[index] = "cd9660"
|
mtypes[index] = "cd9660"
|
||||||
else:
|
else:
|
||||||
mtypes = []
|
# we cannot do a smart "auto", so just call 'mount' once with no -t
|
||||||
|
mtypes = ['']
|
||||||
|
|
||||||
mounted = mounts()
|
mounted = mounts()
|
||||||
with tempdir() as tmpd:
|
with tempdir() as tmpd:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user