From a31fccb0b0d2182b20e6d4b001a710f98f1d84ac Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 2 Mar 2015 21:11:21 +0100 Subject: [PATCH] Uploader: Fix flashing if multiple board types are connected --- Tools/px_uploader.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py index f4e317cfa8..91ac084ef4 100755 --- a/Tools/px_uploader.py +++ b/Tools/px_uploader.py @@ -565,8 +565,12 @@ try: except RuntimeError as ex: - # print the error - print("\nERROR: %s" % ex.args) + if "not suitable" in ex.args: + up.close() + continue + else: + # print the error + print("\nERROR: %s" % ex.args) finally: # always close the port