def binary()

in mozdownload/scraper.py [0:0]


    def binary(self):
        """Return the name of the build."""

        def _get_binary():
            # Retrieve all entries from the remote virtual folder
            parser = self._create_directory_parser(self.path)
            if not parser.entries:
                raise errors.NotFoundError('No entries found', self.path)

            # Download the first matched directory entry
            pattern = re.compile(self.binary_regex, re.IGNORECASE)
            for entry in parser.entries:
                try:
                    self._binary = pattern.match(entry).group()
                    break
                except Exception:
                    # No match, continue with next entry
                    continue
            else:
                raise errors.NotFoundError("Binary not found in folder",
                                           self.path)

        self._retry_check_404(_get_binary)

        return self._binary