Commit a2202345 authored by carlosperate's avatar carlosperate

Updated for Linux and MacOS compatibility.

parent 64ccd366
......@@ -168,7 +168,6 @@ def handle_sketch(sketch_code):
'output': out,
'error_output': error,
'exit_code': exit_code}
print(json.dumps(json_data))
return json.dumps(json_data)
......
......@@ -27,7 +27,7 @@ import os
plat = sys.platform.lower()
if plat[:5] == 'linux': # Linux (confirmed)
from serial.tools.list_ports_linux import comports
from ArduinoServerCompiler.PySerialListPorts.list_ports_linux import comports
elif plat == 'cygwin': # cygwin/win32
def comports():
......@@ -47,7 +47,7 @@ elif plat[:3] == 'bsd' or \
return [(d, d, d) for d in devices]
elif plat[:6] == 'darwin': # OS X (confirmed)
from serial.tools.list_ports_osx import comports
from ArduinoServerCompiler.PySerialListPorts.list_ports_osx import comports
elif plat[:6] == 'netbsd': # NetBSD
def comports():
......
......@@ -113,11 +113,10 @@ class ServerCompilerSettings(object):
self.__compiler_dir__ = None
def set_compiler_dir_from_file(self, new_compiler_dir):
""" The compiler dir must be full path to an .exe file. """
""" The compiler dir must be full path to an existing file. """
# FIXME: this is a windows only check (.exe), needs to be
# updated to be compatible with linux and MacOS
if os.path.exists(new_compiler_dir) and\
new_compiler_dir.endswith('.exe'):
if os.path.exists(new_compiler_dir):
self.__compiler_dir__ = new_compiler_dir
else:
print('\nThe provided compiler path in the settings file is not ' +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment