From 09aa5bb2d90e721e69aa987587f98fe60addbf7f Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 5 Jul 2014 20:33:56 +0300 Subject: [PATCH] only writable partitions are listed as available --- src/diskctl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/diskctl.py b/src/diskctl.py index e570151..7b3f675 100644 --- a/src/diskctl.py +++ b/src/diskctl.py @@ -37,10 +37,13 @@ def _list_mounts(): mount_point = parts[1] fstype = parts[2] opts = parts[3] + + if not os.access(mount_point, os.W_OK): + continue if fstype == 'fuseblk': fstype = 'ntfs' # most likely' - + logging.debug('found mount "%s" at "%s"' % (target, mount_point)) mounts.append({ -- 2.39.5