コード例 #1
0
 def _ensure_output(self, run_id):
     if self._output_run_id == run_id:
         return
     run_dir = os.path.join(var.runs_dir(), run_id)
     if not os.path.exists(run_dir):
         raise NotFound()
     self._output = util.RunOutputReader(run_dir)
     self._output_run_id = run_id
コード例 #2
0
ファイル: runs_impl.py プロジェクト: ErSKS/guildai
def _page_run_output(run):
    reader = util.RunOutputReader(run.path)
    lines = []
    try:
        lines = reader.read()
    except IOError as e:
        cli.error("error reading output for run %s: %s" % (run.id, e))
    lines = [_format_output_line(stream, line) for _time, stream, line in lines]
    cli.page("\n".join(lines))