コード例 #1
0
ファイル: stix_header.py プロジェクト: sgml/python-stix
    def add_description(self, description):
        """**DEPRECATED**. Adds a description to the ``descriptions``
        collection.

        This is the same as calling "foo.descriptions.add(bar)".

        """
        deprecated.warn(description)
        self.descriptions.add(description)
コード例 #2
0
ファイル: stix_header.py プロジェクト: sgml/python-stix
    def add_package_intent(self, package_intent):
        """**DEPRECATED**. Adds :class:`.VocabString` object to the
        :attr:`package_intents` collection.

        If the input is not an instance of :class:`.VocabString`, an effort
        will be made to convert it into an instance of :class:`.PackageIntent`.

        """
        deprecated.warn(package_intent)
        self.package_intents.append(package_intent)
コード例 #3
0
 def _is_valid(self, value):
     deprecated.warn(value)
     return super(_RelatedPackageList, self)._is_valid(value)
コード例 #4
0
ファイル: related.py プロジェクト: STIXProject/python-stix
 def _is_valid(self, value):
     deprecated.warn(value)
     return super(_RelatedPackageList, self)._is_valid(value)