Also moves the list of excluded types to the top level and make it a
frozenset.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
"ubd",
]
+#: Excluded filesystem types
+EXCLUDED_FS = frozenset([
+ "nfs",
+ "nfs4",
+ "autofs",
+ "tmpfs",
+ "proc",
+ "sysfs",
+ "usbfs",
+ "devpts",
+ ])
+
class Error(Exception):
"""Generic exception"""
for line in mountlines:
_, mountpoint, fstype, _ = line.split(None, 3)
# fs type blacklist
- if fstype in ["nfs", "nfs4", "autofs", "tmpfs", "proc", "sysfs"]:
+ if fstype in EXCLUDED_FS:
continue
try:
dev = os.stat(mountpoint).st_dev