(self, keychain_path, verify=True)
return attached_disks
Attaches a disk image with keychain recovery option.

    Args:
      keychain_path: the path to the recovery keychain
      verify: whether to verify the attach.
    Returns:
      disks: a list of Disk objects.
Attaches a disk image with keychain recovery option.
Attaches a disk image with keychain recovery option .
def AttachWithRecover(self, keychain_path, verify=True):
    """Attaches a disk image with keychain recovery option.

    Args:
      keychain_path: the path to the recovery keychain
      verify: whether to verify the attach.
    Returns:
      disks: a list of Disk objects.
    """
    command = ["hdiutil", "attach", "-plist", "-recover", keychain_path]
    if not verify:
      command.append("-noverify")
    command.append(self.imagepath)
    plist = _DictFromSubprocess(command)
    attached_disks = []
    for entity in plist["system-entities"]:
      # strip off /dev from start
      deviceid = entity["dev-entry"].replace("/dev/", "")
      disk = Disk(deviceid)
      attached_disks.append(disk)
    self.attached = True
    return attached_disks
def AttachWithRecover ( self , keychain_path , verify = True ) : command = [ "hdiutil" , "attach" , "-plist" , "-recover" , keychain_path ] if not verify : command . append ( "-noverify" ) command . append ( self . imagepath ) plist = _DictFromSubprocess ( command ) attached_disks = [ ] for entity in plist [ "system-entities" ] : # strip off /dev from start deviceid = entity [ "dev-entry" ] . replace ( "/dev/" , "" ) disk = Disk ( deviceid ) attached_disks . append ( disk ) self . attached = True return attached_disks