def parse_metafiles(self,extract_ttl=False):
        try:
            self.zip = zipfile.ZipFile(self.path)
        except Exception:
            raise self.ParseException("Unable to read the zip file.")
        metafiles = {}
        for ext in ['.ttl','.provn']:
            metafiles[ext] = [v for v in self.zip.infolist()
                              if fnmatch(v.filename, '*'+ext)
                              # strip OS X resource fork
                              and not fnmatch(v.filename,'__MACOSX*')
                              ]
            if 1 > len(metafiles[ext]):
                raise self.ParseException(
                        "Detected more than one {0} file in zip.".format(ext))
            if not metafiles[ext]:
                raise self.ParseException(
                        "No {0} file found in zip.".format(ext))

        self.ttl = metafiles['.ttl'][0]
        self.provn = metafiles['.provn'][0]
        # fix incorrect property format in earlier versions of SPM12 output
        self.raw_ttl = self.fix_spm12_ttl(self.zip.read(metafiles['.ttl'][0]))
        self.ttl_relpath = self.parse_ttl_relative_path(metafiles['.ttl'][0].filename)

        return self.raw_ttl if extract_ttl else True
dataset/ETHPy150Open NeuroVault/NeuroVault/neurovault/apps/statmaps/nidm_results.py/NIDMUpload.parse_metafiles/swapped operands of `>`