Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

Fix stty failed, invalid argument -f. #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ino/commands/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def discover(self):
else:
self.e.find_arduino_tool('avrdude', ['hardware', 'tools', 'avr', 'bin'])
self.e.find_arduino_file('avrdude.conf', ['hardware', 'tools', 'avr', 'etc'])

def run(self, args):
self.discover()
port = args.serial_port or self.e.guess_serial_port()
Expand All @@ -62,7 +62,7 @@ def run(self, args):
raise Abort("%s doesn't exist. Is Arduino connected?" % port)

# send a hangup signal when the last process closes the tty
file_switch = '-f' if platform.system() == 'Darwin' else '-F'
file_switch = '-F' if platform.system() == 'Darwin' else '-f'
ret = subprocess.call([self.e['stty'], file_switch, port, 'hupcl'])
if ret:
raise Abort("stty failed")
Expand Down