def __init__(self, element, doc): """ Creates a new requirement instance """ Requirement.__init__(self, element, doc) if not self.hasAttribute("format"): raise ArchiveRequirementException("Format has to be defined for %s" % self.__class__.__name__) if not self.getAttribute("format") == "cpio": raise ArchiveRequirementException("Format %s is not implemented for %s" % (self.getAttribute("format"), self.__class__.__name__ )) if not self.hasAttribute("name") or not self.hasAttribute("dest"): raise ArchiveRequirementException("Either name or destination not defined in element") self.order=Requirement.BOTH
def __init__(self, element, doc): """ Creates a new requirement instance """ Requirement.__init__(self, element, doc) if not self.hasAttribute("format"): raise SCSIRequirementException("Format has to be defined for %s" % self.__class__.__name__) self.format=self.getAttribute("format") self.name=self.getAttribute("name") self.dest=None if self.hasAttribute("dest"): self.dest=self.getAttribute("dest")
def __init__(self, element, doc): """ Creates a new requirement instance """ Requirement.__init__(self, element, doc) if not self.hasAttribute("format"): raise SCSIRequirementException("Format has to be defined for %s" % self.__class__.__name__) self.format = self.getAttribute("format") self.name = self.getAttribute("name") self.dest = None if self.hasAttribute("dest"): self.dest = self.getAttribute("dest")
def __init__(self, element, doc): """ Creates a new requirement instance """ Requirement.__init__(self, element, doc) if not self.hasAttribute("format"): raise ArchiveRequirementException( "Format has to be defined for %s" % self.__class__.__name__) if not self.getAttribute("format") == "cpio": raise ArchiveRequirementException( "Format %s is not implemented for %s" % (self.getAttribute("format"), self.__class__.__name__)) if not self.hasAttribute("name") or not self.hasAttribute("dest"): raise ArchiveRequirementException( "Either name or destination not defined in element") self.order = Requirement.BOTH
def __init__(self, element, doc): """ Creates a new requirement instance """ Requirement.__init__(self, element, doc) self._message=Message(self)
def __init__(self, element, doc): """ Creates a new requirement instance """ Requirement.__init__(self, element, doc) self._message = Message(self)