def disk_partitions(all=False): retlist = [] partitions = _psutil_osx.get_disk_partitions() for partition in partitions: device, mountpoint, fstype, opts = partition if device == "none": device = "" if not all: if not os.path.isabs(device) or not os.path.exists(device): continue ntuple = nt_partition(device, mountpoint, fstype, opts) retlist.append(ntuple) return retlist
def disk_partitions(all=False): retlist = [] partitions = _psutil_osx.get_disk_partitions() for partition in partitions: device, mountpoint, fstype, opts = partition if device == 'none': device = '' if not all: if not os.path.isabs(device) or not os.path.exists(device): continue ntuple = nt_partition(device, mountpoint, fstype, opts) retlist.append(ntuple) return retlist