Uploader: Fix flashing if multiple board types are connected

This commit is contained in:
Lorenz Meier 2015-03-02 21:11:21 +01:00
parent 8424325f73
commit a31fccb0b0
1 changed files with 6 additions and 2 deletions

View File

@ -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