(self, force=False)
Detaches a disk image.
Detaches a disk image.
Detaches a disk image .
def Detach(self, force=False):
    """Detaches a disk image."""
    images = AttachedImages()
    for image in images:
      if image["image"].imagepath == self.imagepath:
        command = ["hdiutil", "detach"]
        command.append(image["disks"][0].deviceid)
        if force:
          command.append("-force")
        gmacpyutil.RunProcess(command)
def Detach ( self , force = False ) : images = AttachedImages ( ) for image in images : if image [ "image" ] . imagepath == self . imagepath : command = [ "hdiutil" , "detach" ] command . append ( image [ "disks" ] [ 0 ] . deviceid ) if force : command . append ( "-force" ) gmacpyutil . RunProcess ( command )