From 320410b9502ee35813c2bdf616a0cd0bd2068851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Fri, 5 Apr 2024 13:18:01 +0200 Subject: [PATCH] yanger: Allow manufactering date to be day 1-9 When the day of month is 1-9 the format did not match the yang model --- src/statd/yanger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/statd/yanger b/src/statd/yanger index 74627b41..0840fca0 100755 --- a/src/statd/yanger +++ b/src/statd/yanger @@ -160,7 +160,7 @@ def get_vpd_data(vpd): if vpd.get("data"): component["class"] = "infix-hardware:vpd" if vpd["data"].get("manufacture-date"): - component["mfg-date"]=datetime.strptime(vpd["data"]["manufacture-date"],"%m/%d/%Y %H:%M:%S").strftime("%Y-%m-%-dT%H:%M:%SZ") + component["mfg-date"]=datetime.strptime(vpd["data"]["manufacture-date"],"%m/%d/%Y %H:%M:%S").strftime("%Y-%m-%dT%H:%M:%SZ") if vpd["data"].get("manufacter"): component["mfg-name"]=vpd["data"]["manufacturer"] if vpd["data"].get("product-name"):