[petsc-dev] Unguarded framework.logClear() in config/configure.py

Jed Brown jed at jedbrown.org
Wed Feb 19 09:35:39 CST 2020


"Ham, David A" <david.ham at imperial.ac.uk> writes:

> Dear all,
>
> I have a user reporting a petsc build fail on line 517 of config/configure.py because framework is None.
>
> This line was added by Barry in:  https://gitlab.com/petsc/petsc/-/commit/f8c648457d28782525df1eae155c6b3ed2cce293
>
> However the same line occurs three lines after, this time guarded by “if not framework is None:” I wonder if the new logClear should be there at all…
>
> The code in question is:
>
>   framework.logClear()
>   print(msg)
>   if not framework is None:
>     framework.logClear()

Yup, I agree this new line should be deleted.  Also, this should be
sufficient:

  if framework:
    ...



I'm not wild about the quality of the traces/output with this exception
handling mechanism, and find myself often hacking this code to get traces.


More information about the petsc-dev mailing list