(self, password=None)
convenience attrs for direct querying really.
convenience attrs for direct querying really.
convenience attrs for direct querying really .
def Refresh(self, password=None):
    """convenience attrs for direct querying really."""

    if isinstance(self, EncryptedImage) and not password:
      raise MacDiskError("Encrypted Images cannot Refresh without a password")

    self._attributes = _DictFromHdiutilImageInfo(self.imagepath, password)
    # We iterate over all known keys
    keys = ["Class Name", "Checksum Type", "Format", "Partition Information",
            "Segments", "Size Information", "Properties",
            "Backing Store Information", "udif-ordered-chunks",
            "Checksum Value", "Format Description", "partitions"]

    for key in keys:
      try:
        attribute = key.lower().replace(" ", "")
        setattr(self, attribute, self._attributes[key])
      # pylint: disable=pointless-except
      except KeyError:  # not all objects have all these attributes
        pass
def Refresh ( self , password = None ) : if isinstance ( self , EncryptedImage ) and not password : raise MacDiskError ( "Encrypted Images cannot Refresh without a password" ) self . _attributes = _DictFromHdiutilImageInfo ( self . imagepath , password ) # We iterate over all known keys keys = [ "Class Name" , "Checksum Type" , "Format" , "Partition Information" , "Segments" , "Size Information" , "Properties" , "Backing Store Information" , "udif-ordered-chunks" , "Checksum Value" , "Format Description" , "partitions" ] for key in keys : try : attribute = key . lower ( ) . replace ( " " , "" ) setattr ( self , attribute , self . _attributes [ key ] ) # pylint: disable=pointless-except except KeyError : # not all objects have all these attributes pass