<commit_before>import os
from conary.lib import util, epdb
import bootable_image

class RawHdImage(bootable_image.BootableImage):
    def write(self):
        try:
            # instantiate the contents that need to go into the image
            self.createFileTree()
            # and instantiate the image itself
            self.createImage()
            self.status('Compressing hard disk image')
            zipfn = self.compressImage(self.outfile)
            imagesList = [(zipfn, 'Raw Hard Disk Image')]
        except:
            if self.imgcfg.debug:
                epdb.post_mortem(sys.exc_info()[2])
            if self.fakeroot:
                util.rmtree(self.fakeroot)
            os.unlink(self.outfile)
            raise
        else:
            if self.fakeroot:
                util.rmtree(self.fakeroot)
            os.unlink(self.outfile)

        return self.moveToFinal(imagesList,
                                os.path.join(self.cfg.finishedPath,
                                             self.project.getHostname(),
                                             str(self.release.getId())))
<commit_msg>add copyright<commit_after>#
# Copyright (c) 2004-2006 rPath, Inc.
#
# All Rights Reserved
#

import os
from conary.lib import util, epdb
import bootable_image

class RawHdImage(bootable_image.BootableImage):
    def write(self):
        try:
            # instantiate the contents that need to go into the image
            self.createFileTree()
            # and instantiate the image itself
            self.createImage()
            self.status('Compressing hard disk image')
            zipfn = self.compressImage(self.outfile)
            imagesList = [(zipfn, 'Raw Hard Disk Image')]
        except:
            if self.imgcfg.debug:
                epdb.post_mortem(sys.exc_info()[2])
            if self.fakeroot:
                util.rmtree(self.fakeroot)
            os.unlink(self.outfile)
            raise
        else:
            if self.fakeroot:
                util.rmtree(self.fakeroot)
            os.unlink(self.outfile)

        return self.moveToFinal(imagesList,
                                os.path.join(self.cfg.finishedPath,
                                             self.project.getHostname(),
                                             str(self.release.getId())))
{'fraction_non_alphanumeric': 0.08476027397260275, 'fraction_numerical': 0.004280821917808219, 'mean_word_length': 1.4941302027748133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7528636', 'n_tokens_mistral': 638, 'n_tokens_neox': 608, 'n_words': 134}