'Find the mount point of this partition object.
:param open_func: the function to use for opening the file containing
the mounted partitions information
:param filename: where to look for the mounted partitions information
(default None which means it will search /proc/mounts and/or
/etc/mtab)
:return: a string with the mount point of the partition or None if not
mounted'

def get_mountpoint(self, open_func=open, filename=None):

    if filename:
        for line in open_func(filename).readlines():
            parts = line.split()
            if ((parts[0] == self.device) or (parts[1] == self.mountpoint)):
                return parts[1]
        return None
    res = self.get_mountpoint(open_func=open_func, filename='/proc/mounts')
    if (not res):
        res = self.get_mountpoint(open_func=open_func, filename='/etc/mtab')
        if (res != '/'):
            res = None
    return res
