(self, newname)
Renames a single volume.
Renames a single volume.
Renames a single volume .
def Rename(self, newname):
    """Renames a single volume."""
    if self.wholedisk:  # pylint: disable=no-member
      raise MacDiskError("Cannot rename whole disk %s" % self.deviceid)
    else:
      command = ["diskutil", "renameVolume", self.deviceid, newname]
      rc = gmacpyutil.RunProcess(command)[2]
      if rc == 0:
        self.Refresh()
        return True
def Rename ( self , newname ) : if self . wholedisk : # pylint: disable=no-member raise MacDiskError ( "Cannot rename whole disk %s" % self . deviceid ) else : command = [ "diskutil" , "renameVolume" , self . deviceid , newname ] rc = gmacpyutil . RunProcess ( command ) [ 2 ] if rc == 0 : self . Refresh ( ) return True