(self)
Mounts single volumes for partitions, all volumes for whole disks.

    Convenience method so you don't have to test if it's mounted already.

    Returns:
      boolean for success.
Mounts single volumes for partitions, all volumes for whole disks.
Mounts single volumes for partitions all volumes for whole disks .
def EnsureMountedWithRefresh(self):
    """Mounts single volumes for partitions, all volumes for whole disks.

    Convenience method so you don't have to test if it's mounted already.

    Returns:
      boolean for success.
    """
    if self.Mounted():
      self.Refresh()
      return True
    else:
      command = ["diskutil", "mount", self.deviceid]
      if self.wholedisk:  # pylint: disable=no-member
        command[1] = "mountDisk"
      rc = gmacpyutil.RunProcess(command)[2]
      if rc == 0:
        self.Refresh()
        return True
def EnsureMountedWithRefresh ( self ) : if self . Mounted ( ) : self . Refresh ( ) return True else : command = [ "diskutil" , "mount" , self . deviceid ] if self . wholedisk : # pylint: disable=no-member command [ 1 ] = "mountDisk" rc = gmacpyutil . RunProcess ( command ) [ 2 ] if rc == 0 : self . Refresh ( ) return True