Check all hashes present in self.hashes _and_ resource object.

        Simply shows warning for mismatch, does not raise exception or
        otherwise stop process.

def check_hashes(self, filename, resource):
        """Check all hashes present in self.hashes _and_ resource object.

        Simply shows warning for mismatch, does not raise exception or
        otherwise stop process.
        """
        # which hashes to calculate?
        hashes = []
        if ('md5' in self.hashes and resource.md5 is not None):
            hashes.append('md5')
        if ('sha-1' in self.hashes and resource.sha1 is not None):
            hashes.append('sha-1')
        if ('sha-256' in self.hashes and resource.sha256 is not None):
            hashes.append('sha-256')
        # calculate
        hasher = Hashes(hashes, filename)
        # check and report
        if ('md5' in hashes and resource.md5 != hasher.md5):
            self.logger.info(
                "MD5 mismatch for %s, got %s but expected %s" %
                (resource.uri, hasher.md5, resource.md5))
        if ('sha-1' in hashes and resource.sha1 != hasher.sha1):
            self.logger.info(
                "SHA-1 mismatch for %s, got %s but expected %s" %
                (resource.uri, hasher.sha1, resource.sha1))
        if ('sha-256' in hashes and resource.sha256 != hasher.sha256):
            self.logger.info(
                "SHA-256 mismatch for %s, got %s but expected %s" %
                (resource.uri, hasher.sha256, resource.sha256))