Пример #1
0
 def warning(self, text):
     """
     Convenient shortcut to main EDLM LOGGER
     """
     if self.index_file:
         LOGGER.warning(f'"{self.index_file}": {text}')
     else:
         LOGGER.warning(f'"{self.source_folder}": {text}')
Пример #2
0
 def __exit__(self, exc_type, exc_val, exc_tb):
     if not exc_type:
         if self.ctx.keep_temp_dir:
             LOGGER.info(
                 f'"{self.ctx.source_folder}": build successful, keeping temp dir: "{self.path}"'
             )
         else:
             LOGGER.debug(
                 f'"{self.ctx.source_folder}": build successful, removing temp dir'
             )
             shutil.rmtree(self.path)
             self.ctx.temp_dir = None
     else:
         LOGGER.warning(
             f'"{self.ctx.source_folder}": build failed, keeping temp dir: "{self.path}"'
         )