code: def check_hash(self, checker, filename, tfp):
          
          checker.report(
              self.debug,
              "Validating %%s checksum for %s" % filename)
          if not checker.is_valid():
              tfp.close()
              os.unlink(filename)
              raise DistutilsError(
                  "%s validation failed for %s; "
                  "possible download problem?"
                  % (checker.hash.name, os.path.basename(filename))
              )
docs: checker is a ContentChecker