don't use tty module on windows

pull/181/head
Holger Mueller 2020-04-10 10:43:10 +02:00
rodzic 66101992d8
commit f7325764c6
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -16,7 +16,7 @@
import logging
import re
import struct
import tty
import platform
from time import sleep
from typing import List, Tuple
from collections import namedtuple
@ -588,7 +588,9 @@ class NanoVNAV2(VNA):
def __init__(self, app, serialPort):
super().__init__(app, serialPort)
tty.setraw(self.serial.fd)
if platform.system() != 'Windows':
import tty
tty.setraw(self.serial.fd)
self.serial.timeout = 3
# reset protocol to known state