Skip to content

Commit

Permalink
Merge branch 'bugfix/tinytestfw_espport' into 'master'
Browse files Browse the repository at this point in the history
tiny-test-fw: handle case when ESPPORT is not set

See merge request idf/esp-idf!2684
  • Loading branch information
projectgus committed Jul 3, 2018
2 parents 3d880f5 + eb85c4e commit 05a5c58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/tiny-test-fw/IDF/IDFDUT.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ def dump_flush(self, output_file, **kwargs):
@classmethod
def list_available_ports(cls):
ports = [x.device for x in list_ports.comports()]
port_hint = os.getenv('ESPPORT').decode('utf8')
espport = os.getenv('ESPPORT')
if not espport:
return ports

port_hint = espport.decode('utf8')

# If $ESPPORT is a valid port, make it appear first in the list
if port_hint in ports:
Expand Down

0 comments on commit 05a5c58

Please sign in to comment.