Only look for target disk during Upload (#21804)

This commit is contained in:
ManuelMcLure 2021-05-05 17:59:56 -07:00 committed by Scott Lahteine
parent 12bc28bc8c
commit 6e18af6f81

View File

@ -20,7 +20,8 @@ def print_error(e):
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
%(e, env.get('PIOENV')))
try:
def before_upload(source, target, env):
try:
#
# Find a disk for upload
#
@ -116,5 +117,7 @@ try:
else:
print_error('Autodetect Error')
except Exception as e:
except Exception as e:
print_error(str(e))
env.AddPreAction("upload", before_upload)