Did I find the right examples for you? yes no

All Samples(10)  |  Call(9)  |  Derive(0)  |  Import(1)

src/g/r/gramps-3.4.2/src/plugins/import/ImportXml.py   Gramps(Download)
from gen.db import DbTxn
from gen.db.write import CLASS_TO_KEY_MAP
from Errors import GrampsImportError
import Utils
import DateHandler
        if id_ is None:
            raise GrampsImportError(_("The Gramps Xml you are trying to "
                "import is malformed."), _("Attributes that link the data "
                "together are missing."))
                    "the version of Gramps with, which it was produced.\n\n"
                    "The file will not be imported.")
            raise GrampsImportError(_('Import file misses Gramps version'), msg)
        if not re.match("\d+\.\d+\.\d+", self.__xml_version):
            msg = _("The .gramps file you are importing does not contain a "
                    "valid xml-namespace number.\n\n"
                    "The file will not be imported.")
            raise GrampsImportError(_('Import file contains unacceptable XML '
                    "latest version of Gramps and try again." ) % {
                    'newer' : self.__gramps_version, 'older' : const.VERSION }
            raise GrampsImportError('', msg)
        if self.__xml_version < '1.0.0':
            msg = _("The .gramps file you are importing was made by version "

src/g/r/gramps-3.4.2/src/plugins/import/ImportVCard.py   Gramps(Download)
    def check_version(self, fields, data):
        """Check the version of the VCard, only version 3.0 is supported."""
        self.version = data
        if self.version != "3.0":
            raise Errors.GrampsImportError(_("Import of VCards version %s is "