File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2626from pkg_resources import resource_filename
2727from serial .serialutil import SerialException
2828
29+ from distutils .version import LooseVersion
30+
2931IS_DARWIN = platform .system ().lower () == "darwin"
30- OSX_SIERRA = 10.12
32+ OSX_SIERRA = LooseVersion ( " 10.12" )
3133if IS_DARWIN :
32- MAC_VERSION = float (platform .mac_ver ()[0 ])
34+ IS_HIGH_SIERRA_OR_ABOVE = LooseVersion (platform .mac_ver ()[0 ])
3335else :
34- MAC_VERSION = 0
36+ IS_HIGH_SIERRA_OR_ABOVE = False
3537
36- DEFAULT_SERIAL_PORT = '/dev/ptyp0' if MAC_VERSION <= OSX_SIERRA else '/dev/ttyp0'
38+ DEFAULT_SERIAL_PORT = '/dev/ptyp0' if not IS_HIGH_SIERRA_OR_ABOVE else '/dev/ttyp0'
3739
3840if USE_PYMODBUS :
3941 from modbus_simulator .utils .pymodbus_server import ModbusSimu
You can’t perform that action at this time.
0 commit comments