Fix spelling

This commit is contained in:
Peder Bergebakken Sundt 2018-02-16 23:16:34 +01:00
parent aac11e7d54
commit 694f7aab11
1 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ class MPV:
def __init__(self): def __init__(self):
self.requests = nyasync.Queue() self.requests = nyasync.Queue()
self.responces = nyasync.Queue() self.responses = nyasync.Queue()
self.events = nyasync.Queue() self.events = nyasync.Queue()
async def run(self): async def run(self):
@ -44,7 +44,7 @@ class MPV:
async def ensure_running(self): async def ensure_running(self):
await self.proc.wait() await self.proc.wait()
raise Exception("MPV died unexpectedtly") raise Exception("MPV died unexpectedly")
async def process_outgoing(self): async def process_outgoing(self):
async for request in self.requests: async for request in self.requests:
@ -52,12 +52,12 @@ class MPV:
self.ipc_conn.write(b'\n') self.ipc_conn.write(b'\n')
async def process_incomming(self): async def process_incomming(self):
async for responce in self.ipc_conn: async for response in self.ipc_conn:
msg = json.loads(responce) msg = json.loads(response)
if 'event' in msg: if 'event' in msg:
self.events.put_nowait(msg) self.events.put_nowait(msg)
else: # responce else: # response
self.responces.put_nowait(msg) self.responses.put_nowait(msg)
class MPVControl: class MPVControl:
def __init__(self): def __init__(self):
@ -80,4 +80,4 @@ class MPVControl:
# critical section. If await is FIFO, the lock is unnessesary. This # critical section. If await is FIFO, the lock is unnessesary. This
# is the safest option. # is the safest option.
self.mpv.requests.put_nowait(msg) self.mpv.requests.put_nowait(msg)
return await self.mpv.responces.get() return await self.mpv.responses.get()