diff options
Diffstat (limited to 'psutil/_pslinux.py')
| -rw-r--r-- | psutil/_pslinux.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 1bd8e987..9e32f25e 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1179,31 +1179,6 @@ def disk_partitions(all=False): ntuple = _common.sdiskpart(device, mountpoint, fstype, opts) retlist.append(ntuple) - # swap - if all: - try: - f = open_text("%s/swaps" % procfs_path) - except FileNotFoundError: - pass - else: - with f: - f.readline() # header - for line in f.readlines(): - fields = line.split('\t') - device = fields[0].split()[0] - mountp = None - fstype = 'swap' - # The priority column is useful when multiple swap - # files are in use. The lower the priority, the - # more likely the swap file is to be used. - prio = fields[-1].strip() - if re.match(r'(-)?\d+', prio): - opts = "priority=" + prio - else: - opts = '' - ntuple = _common.sdiskpart(device, mountp, fstype, opts) - retlist.append(ntuple) - return retlist |
