def check_smb_mapping(self, smbfs_share):
    mappings = self._smb_conn.Msft_SmbMapping(RemotePath=smbfs_share)
    if (not mappings):
        return False
    if os.path.exists(smbfs_share):
        LOG.debug('Share already mounted: %s', smbfs_share)
        return True
    else:
        LOG.debug('Share exists but is unavailable: %s ', smbfs_share)
        self.unmount_smb_share(smbfs_share, force=True)
        return False
def check_smb_mapping(self, smbfs_share):
    mappings = self._smb_conn.Msft_SmbMapping(RemotePath=smbfs_share)
    if (not mappings):
        return False
    if os.path.exists(smbfs_share):
        LOG.debug('Share already mounted: %s', smbfs_share)
        return True
    else:
        LOG.debug('Share exists but is unavailable: %s ', smbfs_share)
        self.unmount_smb_share(smbfs_share, force=True)
        return False