def checksums(self, file_obj, dumpjobdata): """Run checksum for an output file, and append to the list.""" if Checksummer.NAME in self._enabled: for htype in Checksummer.HASHTYPES: checksum_filename = self._get_checksum_filename_tmp(htype) output = file(checksum_filename, "a") dumpjobdata.debugfn("Checksumming %s via %s" % (file_obj.filename, htype)) dumpfile = DumpFile(self.wiki, dumpjobdata.dump_dir.filename_public_path(file_obj), None, self.verbose) checksum = dumpfile.checksum(htype) if checksum is not None: output.write("%s %s\n" % (checksum, file_obj.filename)) output.close()