<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 2, 2018 at 4:51 PM, Dylan Baker <span dir="ltr"><<a href="mailto:dylan@pnwbakers.com" target="_blank">dylan@pnwbakers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Quoting Marek Olšák (2018-05-02 13:32:43)<br>
<div><div class="h5">> From: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br>
> <br>
> ---<br>
>  framework/summary/html_.py | 18 +++++++++++-------<br>
>  1 file changed, 11 insertions(+), 7 deletions(-)<br>
> <br>
> diff --git a/framework/summary/html_.py b/framework/summary/html_.py<br>
> index f7fdc8576..512b42c24 100644<br>
> --- a/framework/summary/html_.py<br>
> +++ b/framework/summary/html_.py<br>
> @@ -24,20 +24,21 @@<br>
>  <br>
>  from __future__ import (<br>
>      absolute_import, division, print_function, unicode_literals<br>
>  )<br>
>  import errno<br>
>  import getpass<br>
>  import os<br>
>  import shutil<br>
>  import sys<br>
>  import tempfile<br>
> +import traceback<br>
>  <br>
>  import mako<br>
>  from mako.lookup import TemplateLookup<br>
>  import six<br>
>  <br>
>  # a local variable status exists, prevent accidental overloading by renaming<br>
>  # the module<br>
>  from framework import backends, exceptions, core<br>
>  <br>
>  from .common import Results, escape_filename, escape_pathname<br>
> @@ -106,27 +107,30 @@ def _make_testrun_info(results, destination, exclude=None):<br>
>  <br>
>          # Then build the individual test results<br>
>          for key, value in six.iteritems(each.tests):<br>
>              html_path = os.path.join(destination, name,<br>
>                                       escape_filename(key + ".html"))<br>
>              temp_path = os.path.dirname(html_path)<br>
>  <br>
>              if value.result not in exclude:<br>
>                  core.check_dir(temp_path)<br>
>  <br>
> -                with open(html_path, 'wb') as out:<br>
> -                    out.write(_TEMPLATES.get_<wbr>template(<br>
> -                        'test_result.mako').render(<br>
> -                            testname=key,<br>
> -                            value=value,<br>
> -                            css=os.path.relpath(result_<wbr>css, temp_path),<br>
> -                            index=os.path.relpath(index, temp_path)))<br>
> +                try:<br>
> +                    with open(html_path, 'wb') as out:<br>
> +                        out.write(_TEMPLATES.get_<wbr>template(<br>
> +                            'test_result.mako').render(<br>
> +                                testname=key,<br>
> +                                value=value,<br>
> +                                css=os.path.relpath(result_<wbr>css, temp_path),<br>
> +                                index=os.path.relpath(index, temp_path)))<br>
> +                except OSError as e:<br>
> +                    traceback.print_exc()<br>
<br>
</div></div>This makes me really nervous. What are you trying to catch, and why is it<br>
a good idea to print a traceback and continue?<br></blockquote><div><br></div><div>Nicolai, do you know the answer to this one?<br><br></div><div>Thanks,<br></div><div>Marek<br></div></div><br></div></div>