From ca8b6cb6094a77342d033d7862aa4b0eaefb1508 Mon Sep 17 00:00:00 2001 From: JohnK1987 Date: Fri, 19 Jan 2024 21:50:13 +0100 Subject: [PATCH] Update STM32_gen_PeripheralPins.py (#217) Protection against using python version older than python3+ --- targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py b/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py index 63f0e87599..4731e5ea94 100644 --- a/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py +++ b/targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py @@ -27,6 +27,8 @@ from xml.dom.minidom import parse, Node from argparse import RawTextHelpFormatter import subprocess +if sys.version_info[0] < 3: raise Exception("Python 3+ is required (recommended latest one)") + GENPINMAP_VERSION = "1.20.5" ADD_DEVICE_IF = 0