Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[thermalctld] [psud] [chassisd] Fix crash with undefined environment …
…variable (sonic-net#120) When `PSUD_UNIT_TESTING` and `THERMALCTLD_UNIT_TESTING` variables don`t set we have the next problems: ``` psud Traceback (most recent call last): psud File "/usr/local/bin/psud", line 21, in <module> psud if os.environ["PSUD_UNIT_TESTING"] == "1": psud File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__ psud raise KeyError(key) psud KeyError: 'PSUD_UNIT_TESTING' ``` ``` thermalctld Traceback (most recent call last): thermalctld File "/usr/local/bin/thermalctld", line 19, in <module> thermalctld if os.environ["THERMALCTLD_UNIT_TESTING"] == "1": thermalctld File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__ thermalctld raise KeyError(key) thermalctld KeyError: 'THERMALCTLD_UNIT_TESTING' ``` Also fixed the same issue in `chassisd`. Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
- Loading branch information