Chassis: fix pmon docker failure when DEVICE_METADATA is not available (#16527)

Signed-off-by: anamehra anamehra@cisco.com

Added a check for DEVICE_METADATA before accessing the data. This prevents the j2 failure when var is not available.
This commit is contained in:
anamehra 2023-09-13 14:10:56 -07:00 коммит произвёл mssonicbld
Родитель e7f49c9bce
Коммит 3bca122b29
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -112,7 +112,7 @@ dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
{% if DEVICE_METADATA and 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}
{% if not skip_ycabled %}
[program:ycabled]
{% if delay_ycabled %}