Browse Source

add the correct reactor call

main
John-Mark Gurney 7 years ago
parent
commit
d73a839eab
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      yadenon.py

+ 2
- 1
yadenon.py View File

@@ -31,6 +31,7 @@ __license__ = '2-clause BSD license'
# of the authors and should not be interpreted as representing official policies, # of the authors and should not be interpreted as representing official policies,
# either expressed or implied, of the Project. # either expressed or implied, of the Project.


from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, Deferred, returnValue from twisted.internet.defer import inlineCallbacks, Deferred, returnValue
from twisted.protocols import basic from twisted.protocols import basic
from twisted.test import proto_helpers from twisted.test import proto_helpers
@@ -52,7 +53,7 @@ class DenonAVR(object,basic.LineReceiver):
def __init__(self, serdev): def __init__(self, serdev):
'''Specify the serial device connected to the Denon AVR.''' '''Specify the serial device connected to the Denon AVR.'''


self._ser = twisted.internet.serialport.SerialPort(self, serdev, None, baudrate=9600)
self._ser = twisted.internet.serialport.SerialPort(self, serdev, reactor, baudrate=9600)
self._cmdswaiting = {} self._cmdswaiting = {}


self._power = None self._power = None


Loading…
Cancel
Save