X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FPapiHistory.py;fp=resources%2Flibraries%2Fpython%2FPapiHistory.py;h=32429c4f641debd80a9cd6fe1254680e609363ce;hp=65995ce8efe2c22177483bdf2dc8d064dca8ce39;hb=b61c774897a6cce09bd597af6124831e8aea5e8c;hpb=78c59bd99bec595acbd24be8fb1c3337e4b41e56 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)