Fix issue when project without a specified board can't be uploaded // Resolve #1313

This commit is contained in:
Ivan Kravets
2018-01-27 01:16:37 +02:00
parent 8186aed8d9
commit 59fb4b103f

View File

@ -214,11 +214,12 @@ def CheckUploadSize(_, target, source, env): # pylint: disable=W0613,W0621
def PrintUploadInfo(env):
selected = env.subst("$UPLOAD_PROTOCOL")
available = env.BoardConfig().get("upload", {}).get(
"protocols", [selected])
print "Available: %s" % ", ".join(available)
print "Selected: %s" % selected
configured = env.subst("$UPLOAD_PROTOCOL")
if "BOARD" in env:
available = env.BoardConfig().get("upload", {}).get(
"protocols", [configured])
print "Available: %s" % ", ".join(available)
print "Configured: %s" % configured
def exists(_):