capybara/virtualenv/lib/python2.7/site-packages/pip/index.py
def verifiable(self):
        """
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        """
        trusted = self.trusted or getattr(self.comes_from, "trusted", None)
        if trusted is not None and trusted:
            # This link came from a trusted source. It *may* be verifiable but
            #   first we need to see if this page is operating under the new
            #   API version.
            try:
                api_version = getattr(self.comes_from, "api_version", None)
                api_version = int(api_version)
            except (ValueError, TypeError):
                api_version = None

            if api_version is None or api_version <= 1:
                # This link is either trusted, or it came from a trusted,
                #   however it is not operating under the API version 2 so
                #   we can't make any claims about if it's safe or not
                return

            if self.hash:
                # This link came from a trusted source and it has a hash, so we
                #   can consider it safe.
                return True
            else:
                # This link came from a trusted source, using the new API
                #   version, and it does not have a hash. It is NOT verifiable
                return False
        elif trusted is not None:
            # This link came from an untrusted source and we cannot trust it
            return False
def verifiable(self):
        trusted = self.trusted or getattr(self.comes_from, "trusted", None)
        if trusted is not None and trusted:
            # This link came from a trusted source. It *may* be verifiable but
            #   first we need to see if this page is operating under the new
            #   API version.
            try:
                api_version = getattr(self.comes_from, "api_version", None)
                api_version = int(api_version)
            except (ValueError, TypeError):
                api_version = None

            if api_version is None or api_version <= 1:
                # This link is either trusted, or it came from a trusted,
                #   however it is not operating under the API version 2 so
                #   we can't make any claims about if it's safe or not
                return

            if self.hash:
                # This link came from a trusted source and it has a hash, so we
                #   can consider it safe.
                return True
            else:
                # This link came from a trusted source, using the new API
                #   version, and it does not have a hash. It is NOT verifiable
                return False
        elif trusted is not None:
            # This link came from an untrusted source and we cannot trust it
            return False
def verifiable ( self ) : trusted = self . trusted or getattr ( self . comes_from , "trusted" , None ) if trusted is not None and trusted : # This link came from a trusted source. It *may* be verifiable but #   first we need to see if this page is operating under the new #   API version. try : api_version = getattr ( self . comes_from , "api_version" , None ) api_version = int ( api_version ) except ( ValueError , TypeError ) : api_version = None if api_version is None or api_version <= 1 : # This link is either trusted, or it came from a trusted, #   however it is not operating under the API version 2 so #   we can't make any claims about if it's safe or not return if self . hash : # This link came from a trusted source and it has a hash, so we #   can consider it safe. return True else : # This link came from a trusted source, using the new API #   version, and it does not have a hash. It is NOT verifiable return False elif trusted is not None : # This link came from an untrusted source and we cannot trust it return False
Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
Returns True if this link can be verified after download False if it cannot and None if we cannot determine .