def sync(self):
        '''Copy disk image to path, regenerate OVF descriptor'''
        self.copy_disk()
        self.ovf_descriptor = self.new_ovf_descriptor()

        ovf_xml = self.ovf_descriptor.generate_ovf_xml()

        try:
            os.makedirs(os.path.dirname(self.ovf_path))
        except __HOLE__, e:
            if "File exists" not in e:
                raise

        ovf_xml.write(self.ovf_path)
dataset/ETHPy150Open redhat-imaging/imagefactory/imagefactory_plugins/ovfcommon/ovfcommon.py/OVFPackage.sync