Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
some lua adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
kmpm committed Dec 15, 2019
1 parent 0e7bc5f commit f3c736c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodemcu_uploader/serialutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
from serial.tools import list_ports


def default_port(sysname=system()):
def default_port(sysname=system(), detect=True):
"""This returns the default port used for different systems if SERIALPORT env variable is not set"""
system_default = {
'Windows': 'COM1',
'Darwin': '/dev/tty.SLAB_USBtoUART'
}.get(sysname, '/dev/ttyUSB0')
# if SERIALPORT is set then don't even waste time detecting ports
if 'SERIALPORT' not in environ:
if 'SERIALPORT' not in environ and detect:
try:
ports = list_ports.comports(include_links=False)
if len(ports) == 1:
Expand Down

0 comments on commit f3c736c

Please sign in to comment.