def publish(self): """ publish this entry's source file inside symstore """ dest_dir = self._dest_dir() os.makedirs(dest_dir) if self.compressed: cab.compress(self.source_file, path.join(dest_dir, self.file_name[:-1]+"_")) else: shutil.copy(self.source_file, dest_dir)
def publish(self): """ publish this entry's source file inside symstore """ dest_dir = self._dest_dir() os.makedirs(dest_dir) if self.compressed: cab.compress(self.source_file, path.join(dest_dir, self.file_name[:-1] + "_")) else: shutil.copy(self.source_file, dest_dir)
def publish(self): """ publish this entry's source file inside symstore """ dest_dir = self._dest_dir() if not path.isdir(dest_dir): log.debug("Created directories: %s " % dest_dir) os.makedirs(dest_dir) if self.compressed: cab.compress(self.source_file, path.join(dest_dir, self.file_name[:-1]+"_")) else: try: log.debug("Copy %s %s" % (self.source_file, dest_dir)) shutil.copy(self.source_file, dest_dir) except (IOError, OSError) as e: log.debug("Can\'t copy %s to %s. Error: %s" % (self.source_file, dest_dir, e))