Browse Source

Fix logic bug in platform EOL check code. (#18172)

Austin S. Hemmelgarn 8 months ago
parent
commit
5e0e6164b9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      .github/scripts/platform-impending-eol.py

+ 3 - 2
.github/scripts/platform-impending-eol.py

@@ -48,13 +48,14 @@ except urllib.error.HTTPError as e:
             )
             sys.exit(EXIT_FAILURE)
 
-eol = datetime.date.fromisoformat(data['eol'])
 
 if LTS == '1' and 'extendedSupport' in data:
-    datetime.date.fromisoformat(data['extendedSupport'])
+    ref = 'extendedSupport'
 else:
+    ref = 'eol'
     LTS = False
 
+eol = datetime.date.fromisoformat(data[ref])
 offset = abs(eol - NOW)
 
 if offset <= LEAD_DAYS: