Fix Python 3.5 compatibility
This commit is contained in:
parent
91067fcbd8
commit
c7a50aec38
2 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ class TestProperties(MpvTestCase):
|
||||||
while self.m.core_idle:
|
while self.m.core_idle:
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
for name in sorted(self.m.property_list):
|
for name in sorted(self.m.property_list):
|
||||||
if name in ('external-file','input-ipc-server', 'heartbeat-cmd', 'wid', 'input-file'):
|
if name in ('external-file','input-ipc-server', 'heartbeat-cmd', 'wid', 'input-file', 'input-unix-socket'):
|
||||||
continue
|
continue
|
||||||
name = name.replace('-', '_')
|
name = name.replace('-', '_')
|
||||||
with self.subTest(property_name=name), self.swallow_mpv_errors([
|
with self.subTest(property_name=name), self.swallow_mpv_errors([
|
||||||
|
|
|
||||||
2
mpv.py
2
mpv.py
|
|
@ -1253,7 +1253,7 @@ class MPV(object):
|
||||||
"""
|
"""
|
||||||
def register(cb):
|
def register(cb):
|
||||||
if name in self._python_streams:
|
if name in self._python_streams:
|
||||||
raise KeyError(f'Python stream name "{name}" is already registered')
|
raise KeyError('Python stream name "{}" is already registered'.format(name))
|
||||||
self._python_streams[name] = (cb, size)
|
self._python_streams[name] = (cb, size)
|
||||||
def unregister():
|
def unregister():
|
||||||
if name not in self._python_streams or\
|
if name not in self._python_streams or\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue