def _validate_bag(self, bag, **kwargs):
        """
        Validate BagIt (checksums, payload.oxum etc)
        """
        failed = None
        try:
            bag.validate(**kwargs)
        except BagValidationError as e:
            failed = e
            #  for d in e.details:
            #      if isinstance(d, ChecksumMismatch):
            #          log.error("Validation Error: expected %s to have %s checksum of %s but found %s", d.path, d.algorithm, d.expected, d.found)
            #      else:
            #          log.error("Validation Error: %s", d)
        if failed:
            raise BagValidationError("%s" % failed)
Validate BagIt (checksums, payload.oxum etc)