Fix: Do not touch PAPI history on bad DICT__nodes 83/34183/1
authorVratko Polak <vrpolak@cisco.com>
Tue, 28 Sep 2021 12:59:28 +0000 (14:59 +0200)
committerTibor Frank <tifrank@cisco.com>
Wed, 20 Oct 2021 10:19:04 +0000 (10:19 +0000)
commitc73f076177d0516b3d5da262354e72e42dcdc8be
tree27f6cd9e5aa5ff4ed8d586ec542a485802058e5d
parenta1ace5b2d725267f1f61542a720154a05481b70c
Fix: Do not touch PAPI history on bad DICT__nodes

Usually, DICT__nodes is populated from reserved topology yaml.
But is some cases (doc generation, maybe pylint) there is no yaml.

The proper fix is to never execute any business logic
just when a module is imported.
This is just a quick workaround.

Ticket: CSIT-1793

Change-Id: I6d7250dc75d12baf120758ade8730af89431265a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit b61c774897a6cce09bd597af6124831e8aea5e8c)
resources/libraries/python/PapiHistory.py