miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
467 stars 110 forks source link

Queue vs queue #73

Closed mode2k closed 6 years ago

mode2k commented 6 years ago

Im am getting this error

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.3-py3.5.egg/eiscp/core.py", line 521, in send File "/usr/local/lib/python3.5/dist-packages/onkyo_eiscp-1.2.3-py3.5.egg/eiscp/core.py", line 508, in _ensure_thread_running NameError: name 'Queue' is not defined

Relavant code in https://github.com/miracle2k/onkyo-eiscp/blob/master/eiscp/core.py#L508

def _ensure_thread_running(self):
    if not getattr(self, '_thread', False):
        self._stop = False
        self._queue = Queue.Queue()
        self._thread = threading.Thread(target=self._thread_loop)
        self._thread.start()

Should it be self._queue = queue.Queue() ?

Edit: Need to be fixed in line 560 (Exception) too.

BR

mode