X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FPapiHistory.py;h=32429c4f641debd80a9cd6fe1254680e609363ce;hb=03984cf5e2affcb715559fad5f68b8ba165ff8cd;hp=65995ce8efe2c22177483bdf2dc8d064dca8ce39;hpb=7829fea4a2c8936513fa95215b7d84997f814a69;p=csit.git diff --git a/resources/libraries/python/PapiHistory.py b/resources/libraries/python/PapiHistory.py index 65995ce8ef..32429c4f64 100644 --- a/resources/libraries/python/PapiHistory.py +++ b/resources/libraries/python/PapiHistory.py @@ -120,4 +120,9 @@ class PapiHistory: PapiHistory.show_papi_history(node) -PapiHistory.reset_papi_history_on_all_duts(DICT__nodes) +# This module can be imported outside usual Robot test context, +# e.g. in pylint or by tools generating docs from docstrings. +# For the tools to work, we need to avoid processing +# when DICT__nodes value is not usable. +if DICT__nodes: + PapiHistory.reset_papi_history_on_all_duts(DICT__nodes)